Possible minor bug

Eric Tang <[email protected]> Mon, 1 Aug 2016 18:09:54 -0700
Newsgroups gmane.comp.hardware.avr.gcc
Message-ID <CABL9ZcMPhYkZeVt7J2Wq5LKCAWhrsaQTDKjc-OTGkNn-0mGFJQ@mail.gmail.com>
Hi avr-gcc mailing list,

I think I have discovered a minor bug. I get the "initializer element is
not constant" error when I try to compile the following code with avr-gcc.
If I remove the cast, the code compiles without issue. However, its
presence does not cause a similar error when I try to compile the code with
Clang or with arm-none-eabi-gcc, leading me to believe that there is in
fact a bug and that it is specific to avr-gcc.

struct color {
    uint8_t r;
    uint8_t g;
    uint8_t b;
} color = (struct color){ 255, 255, 255 };

Thanks,
Eric

_______________________________________________
AVR-GCC-list mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/avr-gcc-list