This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Bug c/16566] [3.4/3.5 Regression] ICE with flexible arrays


Note that this already fails with 3.2.3 if you use -std=c99 -pedantic.

Also note that though the code should be accepted, it has undefined 
behavior if executed; a non-lvalue with structure with flexible array 
member type is a value that does not refer to an object (other than a 
temporary that disappears at the next sequence point), so members of the 
flexible array can't be accessed without undefined behavior.

-- 
Joseph S. Myers               http://www.srcf.ucam.org/~jsm28/gcc/
    jsm@polyomino.org.uk (personal mail)
    jsm28@gcc.gnu.org (Bugzilla assignments and CCs)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]