Re: Gcc and undefined behavior

2014-04-29 Thread Michael Tautschnig
On Mon, Apr 28, 2014 at 16:45:56 +, Thorsten Glaser wrote: > Shachar Shemesh debian.org> writes: > > > the changes there is a runtime check for undefined behavior. Just > > compile with -fsanitize=undefined, and your program will crash with > > log if it performs an operation that

Re: Gcc and undefined behavior

2014-04-29 Thread Kevin Chadwick
previously on this list Vincent Lefevre contributed: > > Plus, crashing in a screensaver is bad :D > > The sanitizers should be used only for testing / debugging, or > possibly for critical applications where it may be better to crash > (in a controlled way) than behave erratically with possibl

Re: Gcc and undefined behavior

2014-04-28 Thread Paul Wise
On Tue, Apr 29, 2014 at 12:45 AM, Thorsten Glaser wrote: > Plus, crashing in a screensaver is bad :D Only if the screensaver or the thing that runs it is written without the possibility of crashes in mind. -- bye, pabs http://wiki.debian.org/PaulWise -- To UNSUBSCRIBE, email to debian-devel

Re: Gcc and undefined behavior

2014-04-28 Thread Vincent Lefevre
On 2014-04-28 16:45:56 +, Thorsten Glaser wrote: > Shachar Shemesh debian.org> writes: > > > the changes there is a runtime check for undefined behavior. Just > > compile with -fsanitize=undefined, and your program will crash with > > log if it performs an operation that C/C++ con

Re: Gcc and undefined behavior

2014-04-28 Thread Thorsten Glaser
Shachar Shemesh debian.org> writes: > the changes there is a runtime check for undefined behavior. Just > compile with -fsanitize=undefined, and your program will crash with > log if it performs an operation that C/C++ considers to be > undefined. This does not help. At all. Con

Re: Gcc and undefined behavior

2014-04-27 Thread Vincent Lefevre
On 2014-04-24 22:04:40 +0300, Shachar Shemesh wrote: > Following the discussion from a few days ago about Cava (C like language > with no undefined behavior), gcc 4.9 is now out[1]. One of the changes > there is a runtime check for undefined behavior. Just compile with > -fsanitize=undefined, and y