Problem with FS

Joel Sherrill joel.sherrill at
Tue Jan 16 15:19:25 UTC 2007

Leon Pollak wrote:
> Hello, all.
> The RTEMS source code has many constants declared as enumerations.
> Recently I had the following problem:
> I add to the application compilation call flag for the gcc: - fshort-enums.
> This flag makes all enums to be 8bits instead of 32bits as default. this leads 
> to the configuration tables in init task creation with 1 byte, while 
> libraries still thought about 4 bytes.
> I need this because gcc-3.x does not allow to declare enums with 
> __attribute__((packed)), only version 4. 
I think this is just another case of where all libraries and the 
application have to
match their use of certain flags.  Other examples include the mips -Gn 
flag, the
x86 and m68k -mrtd  flag, and various CPUs with ABI selection flags.

You would have to make sure newlib, RTEMS, libstdc++, etc are all compiled
with matching flags.

> And I (and rtems, even 4.7, yes?) 
> still use 3.1.
The rtems 4.7 gcc is 4.1.1. :-)
> I think that this situation (which took me 2 days) may be rather common. May 
> be something can be done to protect rtems code from such things? Or user?
> Any thoughts?
> Thanks.

More information about the users mailing list