--- 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
--- 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...@d
Severity: enhancement
Priority: P3
Component: preprocessor
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: vegard dot nossum at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36357
--- Comment #4 from vegard dot nossum at gmail dot com 2008-02-05 09:23
---
Is there a work-around, i.e. a command-line flag that turns _this particular_
kind of optimization off (without turning off all optimizations)? It seems that
the behaviour is found in -O1 and -O2 as well, in