http://gcc.gnu.org/gcc-2.96.html

Srini wrote:
> The following program is behaving differently when executed directly
> and within gdb. While the direct execution seg faults, within gdb, it
> says that the program exited normally. Am I missing something here? 

The program invokes undefined behaviour.

> The program must seg fault - I checked it in VC++ also. How is it that
> gdb says program exited normally?

String literals can be made writable, in particular in a debugger
environment that could be the case, and you can also compile it in for
legacy reasons.

Uli

-- 
http://gcc.gnu.org/faq.html
http://parashift.com/c++-faq-lite/

_______________________________________________
Help-gplusplus mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-gplusplus

Reply via email to