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++/31287] Infinite for loop while initializing char array



------- Comment #1 from pinskia at gcc dot gnu dot org  2007-03-20 21:01 -------
Note you are going over name_array's bounds so you are invoking undefined
behavior.  7 <= 7. arrays go from 0 to last-1 in C or (0, last-1] in math
notation for C arrays.


-- 


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


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