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]

[Bug c/33024] gcc allows negatively-sized arrays



------- Comment #4 from sdyoung at miranda dot org  2007-08-08 17:18 -------
I should clarify that the assembly below is generated from exactly the code I
included in my original bug report.

Furthermore, if it is being converted to 0xFFFFFFFD, then

#include <stdio.h>

int main(int argc, char **argv) {
        int y = -2;
        int x[y];

        x[5000] = 4321;
}

should not segfault (which it does).


-- 

sdyoung at miranda dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |UNCONFIRMED
         Resolution|INVALID                     |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33024


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