This is the mail archive of the gcc-patches@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] |
Hello,
the following patch is rather for GCC 4.5 and will be also useful for Fortran 2003's IEEE.
Using -finit-real=snan -ffpe-trap=invalid, one can detect certain kind of expressions of uninitialized variables, e.g.:
! y be not initialized x = y ! Not detected x = y + 1 ! SIGFPE x = cos(y) ! SIGF print *, y ! Not detected, prints "NaN"
OK for the trunk (i.e. 4.5 - or should this already go to 4.4?)? Build & tested on x86-64-linux
Cheers, Daniel
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |