[Bug c/63233] Missing Warray-bounds warning for array within struct

2014-09-11 Thread leis at in dot tum.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63233 --- Comment #5 from leis at in dot tum.de --- Thanks. I did notice that I get warning with optimization but not without, which is strange indeed. However, obviously my real problem is more complicated, and I'm trying to understand if I vi

[Bug c/63233] New: Valid out of bounds access leads to undefined behavior

2014-09-11 Thread leis at in dot tum.de
Component: c Assignee: unassigned at gcc dot gnu.org Reporter: leis at in dot tum.de Consider the following (minimized) program: #include #include struct Foo { int a[1]; int b; }; int main(int argc, char** argv) { int index = atoi(argv[1]); struct Foo foo; foo.a