[Bug c/36839] struct with only anonymous unions plus flexible array member

2014-04-15 Thread mpolacek at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36839 Marek Polacek changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED CC|

[Bug c/36839] struct with only anonymous unions plus flexible array member

2009-02-27 Thread joseph at codesourcery dot com
--- Comment #5 from joseph at codesourcery dot com 2009-02-27 20:58 --- Subject: Re: struct with only anonymous unions plus flexible array member Anonymous unions are outside the scope of C99, so this issue is purely about what is most useful for GNU C right now. However, there have

[Bug c/36839] struct with only anonymous unions plus flexible array member

2009-02-27 Thread vegard dot nossum at gmail dot com
--- Comment #4 from vegard dot nossum at gmail dot com 2009-02-27 20:32 --- Workaround: Install an empty dummy member between the union and the array, like this: struct x { union { int x; }; int _dummy[0]; // workaround int array[]; };

[Bug c/36839] struct with only anonymous unions plus flexible array member

2009-02-27 Thread vegard dot nossum at gmail dot com
--- Comment #3 from vegard dot nossum at gmail dot com 2009-02-27 20:27 --- I'm hitting this as well :-( [veg...@damson ~/programming 0] $ cat flexible-array-empty-struct.c struct x { union { int x; }; int array[]; }; [veg...@damson ~/programm

[Bug c/36839] struct with only anonymous unions plus flexible array member

2008-12-27 Thread pinskia at gcc dot gnu dot org
--- Comment #2 from pinskia at gcc dot gnu dot org 2008-12-27 20:45 --- http://gcc.gnu.org/ml/gcc-patches/2001-01/msg00357.html Hmm, this is on purpose as far as I can tell. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36839

[Bug c/36839] struct with only anonymous unions plus flexible array member

2008-12-27 Thread pinskia at gcc dot gnu dot org
--- Comment #1 from pinskia at gcc dot gnu dot org 2008-12-27 20:31 --- else if (!saw_named_field) { error ("%Jflexible array member in otherwise empty struct", x); TREE_TYPE (x) = error_mark_node; } Hmm, it explicitly look