#2967 closed enhancement (fixed)
ARM: Change ABI to not use short enums
Reported by: | Sebastian Huber | Owned by: | Sebastian Huber |
---|---|---|---|
Priority: | normal | Milestone: | 5.1 |
Component: | tool/gcc | Version: | |
Severity: | normal | Keywords: | |
Cc: | Blocked By: | ||
Blocking: |
Description
Whether enums are short or not is left open in the ARM EABI. On Linux and FreeBSD no short enums are used. Otherwise short enums are enabled by default.
Short enums may cause hard to find issues with 3rd party software, since the are quite unusual in general, e.g.
The data and structure layout may suddenly change in case enumeration values are added/removed. The benefit of short enums is probably not worth the trouble, since the packed compiler attribute can be used to individually make an enum short.
The reason for not choosing no short enums during the ARM EABI introduction was an issue with Newlib. This is addressed with the following patch:
Change History (6)
comment:1 Changed on 04/03/17 at 06:07:37 by Sebastian Huber
Owner: | changed from joel.sherrill@… to Sebastian Huber |
---|---|
Status: | new → accepted |
comment:2 Changed on 04/07/17 at 07:07:15 by Sebastian Huber
comment:3 Changed on 04/07/17 at 07:19:04 by Sebastian Huber
GCC website update done (GCC 6.4 changes show up once released):
https://gcc.gnu.org/gcc-6/changes.html
https://gcc.gnu.org/gcc-7/changes.html
comment:4 Changed on 06/08/17 at 07:30:12 by Sebastian Huber
Resolution: | → fixed |
---|---|
Status: | accepted → closed |
Fixed due to change to GCC 7.1.
comment:5 Changed on 10/10/17 at 05:58:26 by Sebastian Huber
Component: | GCC → tool/gcc |
---|
comment:6 Changed on 11/09/17 at 06:27:14 by Sebastian Huber
Milestone: | 4.12.0 → 5.1 |
---|
Milestone renamed
GCC changes are in place:
https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=246753
https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=246754