ARM enum sizes diagnostic

Nick Clifton nickc@redhat.com
Thu Feb 15 17:38:00 GMT 2007


Hi Mark,

> The diagnostic seen below should be marked as a warning rather
> than an error; it is possible for the diagnostic to arise when compiling
> with GCC and -fshort-enums in a situation where the values of such
> short enumerations cannot escape the compilation unit.  It is in
> fact already treated as a warning rather than an error as seen below.

This is OK, but if you are going to fix this message then you might as 
well go the whole hog.  Specifically:

   * Report the two enum sizes.
   * Explain to the user why this might not be a problem.

So maybe something like this:

   warning: <foo.o> places 'enum' values into <N> bytes whereas
    <bar.o> places them into <M> bytes.  This will cause problems
    if the two files attempt to share enum values.

You may also want to think about having a way of disabling this warning 
message for users that do not want it.

Cheers
   Nick



More information about the Binutils mailing list