https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82296
--- Comment #6 from Ingo ---
> https://www.securecoding.cert.org/confluence/display/c/ARR30-C.+Do+not+form+or+use+out-of-bounds+pointers+or+array+subscripts
Just out of curiosity:
I am not able to find any of that in the ANSI/ISO C89 standard. T
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82296
--- Comment #3 from Ingo ---
Just to be sure:
On a real machine this code is certainly not "undefined behavior", because
gMyUnion.numbers[ARRAYSIZE] aliases gMyUnion.dummy[ARRAYSIZE] and
gMyUnion.dummy[ARRAYSIZE] is a valid memory location.
So
Assignee: unassigned at gcc dot gnu.org
Reporter: lundril at gmx dot de
Target Milestone: ---
Created attachment 42226
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42226&action=edit
Compiling this code results in assembler which translates to "return 1;"
To repro