[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: strange behavior in g++ 2.96
From: |
Ulrich Eckhardt |
Subject: |
Re: strange behavior in g++ 2.96 |
Date: |
Fri, 12 Aug 2005 18:00:01 +0200 |
User-agent: |
KNode/0.8.2 |
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/