Re: No effect of -fshort-enums..is it a bug

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Sep 21, 2005 at 05:46:58PM +0530, Gaurav Gautam, Noida wrote:
> int main()
> {
>         enum aa {
>         a = 0, b =127  , c
>         };
>  
>         printf("size = %d  %d %d\n", sizeof(a),sizeof(b), sizeof(c));
>         printf("value= %d  %d %d\n", a,b,c);
>         return 0;
> }

> The option -fshort-enums has no effect and the output is same as it is without this option.

It's not a bug.  Add sizeof(enum aa) to your printf; _that_ will be
affected by -fshort-enums.  The type of the enumerators remains int.

-- 
Daniel Jacobowitz
CodeSourcery, LLC

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux