This is the mail archive of the gcc@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]

Global null pointer test


I was looking at the V3.0 feature list when I came upon the global
null pointer test elimination optimization. I _love_ what what one can
do with full access to the internal compiler structures.

On the otherhand, if that optimization was ever applied to I anything
that I wrote, I would _much_ rather have a warning than have it
quietly optimized away.

Why? Because it clearly indicates that I'm in two minds on the
validity of that pointer, and equally clearly one of those two minds
is wrong...

Looking at gcse.c I suspect it would be fairly easy to add a very
small tweak that spat out a warning (if -Wnull-pointer-test is set) and
then did the optimization.

Should I have a bash at that? Or would the author of that code please
add it?

Thanks,


John Carter                             Phone : (64)(3) 358 6639
Tait Electronics                        Fax   : (64)(3) 359 4632
PO Box 1645 Christchurch                Email : john.carter@tait.co.nz
New Zealand




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]