query: -fshort-enums is default on which targets ?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

query: -fshort-enums is default on which targets ?

Gaurav Gautam, Noida
Hi,

The description about the option -fshort-enums on gcc.gnu.org says, that

"-fshort-enums is the default on some targets, as required by the platform ABI."


1) Can anyone tell me, on which all targets, this is default?

2) Or if anyone can tell me any document through which I can find the list of those target.

3) I believe that this can also be found out by looking into gcc source code. Can anyone help to by telling me the approximate section of code, where I should look for this?


--gaurav
Reply | Threaded
Open this post in threaded view
|

Re: query: -fshort-enums is default on which targets ?

Andreas Schwab
"Gaurav Gautam, Noida" <[hidden email]> writes:

> 1) Can anyone tell me, on which all targets, this is default?

$ grep -r TARGET_DEFAULT_SHORT_ENUMS gcc
gcc/config/arm/arm.c:#undef TARGET_DEFAULT_SHORT_ENUMS
gcc/config/arm/arm.c:#define TARGET_DEFAULT_SHORT_ENUMS arm_default_short_enums
gcc/doc/tm.texi:@deftypefn {Target Hook} bool TARGET_DEFAULT_SHORT_ENUMS (void)
gcc/target-def.h:#define TARGET_DEFAULT_SHORT_ENUMS hook_bool_void_false
gcc/target-def.h:  TARGET_DEFAULT_SHORT_ENUMS, \
gcc/ChangeLog-2004: (TARGET_DEFAULT_SHORT_ENUMS): Define.
gcc/ChangeLog-2004: * target-def.h (TARGET_DEFAULT_SHORT_ENUMS): New.
gcc/ChangeLog-2004: (TARGET_INITIALIZER): Add TARGET_DEFAULT_SHORT_ENUMS.
gcc/ChangeLog-2004: TARGET_DEFAULT_SHORT_ENUMS.  Update the description.

Andreas.

--
Andreas Schwab, SuSE Labs, [hidden email]
SuSE Linux Products GmbH, Maxfeldstra?e 5, 90409 N?rnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."