[RTEMS Project] #2967: ARM: Change ABI to not use short enums
RTEMS trac
trac at rtems.org
Mon Apr 3 06:07:23 UTC 2017
#2967: ARM: Change ABI to not use short enums
-----------------------------+-----------------------------
Reporter: Sebastian Huber | Owner: joel.sherrill@…
Type: enhancement | Status: new
Priority: normal | Milestone: 4.12.0
Component: GCC | Version:
Severity: normal | Keywords:
-----------------------------+-----------------------------
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.
https://git.rtems.org/rtems-
libbsd/commit/freebsd/include/rpc?id=9880635f2e642380b69b85e00271649b3a2fc2de
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:
https://sourceware.org/ml/newlib/2017/msg00238.html
--
Ticket URL: <http://devel.rtems.org/ticket/2967>
RTEMS Project <http://www.rtems.org/>
RTEMS Project
More information about the bugs
mailing list