[ARM] EABI and the default to short enums

Sebastian Huber sebastian.huber@embedded-brains.de
Tue Feb 14 13:23:00 GMT 2012


Hello,

the default ARM EABI configuration uses short enums by default (from 
"gcc/config/arm/arm.c":

/* AAPCS based ABIs use short enums by default.  */

static bool
arm_default_short_enums (void)
{
   return TARGET_AAPCS_BASED && arm_abi != ARM_ABI_AAPCS_LINUX;
}

This causes a major headache for me since some libraries assume that sizeof(any 
enum) > 1, e.g. the standard XDR library.  Is the only possible way to disable 
short enums to set the ABI to ARM_ABI_AAPCS_LINUX?  Which side effects does 
this have?

Have a nice day!

-- 
Sebastian Huber, embedded brains GmbH

Address : Obere Lagerstr. 30, D-82178 Puchheim, Germany
Phone   : +49 89 18 90 80 79-6
Fax     : +49 89 18 90 80 79-9
E-Mail  : sebastian.huber@embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.



More information about the Gcc mailing list