[Bug c++/32786] Incorrect code compiles and runs well

2007-07-16 Thread bachmann dot matt at gmail dot com
--- Comment #4 from bachmann dot matt at gmail dot com 2007-07-17 04:04 --- alright then. ::shrugs:: thanks -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32786

[Bug c++/32786] Incorrect code compiles and runs well

2007-07-16 Thread pinskia at gcc dot gnu dot org
--- Comment #3 from pinskia at gcc dot gnu dot org 2007-07-17 03:58 --- No, it is crashing. Anyways this is just undefined behavior so any behavior here is ok :). -- pinskia at gcc dot gnu dot org changed: What|Removed |Added -

[Bug c++/32786] Incorrect code compiles and runs well

2007-07-16 Thread bachmann dot matt at gmail dot com
--- Comment #2 from bachmann dot matt at gmail dot com 2007-07-17 03:39 --- but thats just it! alright it does not infinite loop but for me it does not crash, it runs perfectly. Here is my output: $ g++ HW1.cpp $ ./a.out 23 Mary had a little lamb. ary had a little lamb. ry had a littl

[Bug c++/32786] Incorrect code compiles and runs well

2007-07-16 Thread pinskia at gcc dot gnu dot org
--- Comment #1 from pinskia at gcc dot gnu dot org 2007-07-17 03:17 --- > the condition in the while loop should cause an infinite loop and should be > moby* I think you mean *moby. Anyways it is just undefined that you go past the array bounds when incrementing a pointer so we know it