------- Comment #34 from pinskia at gcc dot gnu dot org  2007-01-21 16:31 
-------
> The range analysis has nothing to do with just assuming integers can't wrap.

Partly wrong, range analysis is helped by the fact assuming integers can't
wrap.  If range analysis dependent on pointer overflow being undefined, would
you complain then, I bet you would.

Intel's compiler assumes integer overflow is undefined but if you think it does
not, then fine, most if not all commerial compilers assume that.  Unlike them,
we give you an option to assume otherwise.

>I don't see why making make_range in fold-const.c 

It is already if you use -fwrapv.

The problem here is that the people who added these security checks in the
first place did not know C.  So either GCC can be changed or these programs can
be fixed by the way comp.lang.c faq recommends or by using -fwrapv.  If we
change GCC, you punish the people who actually write defined C so that is out
of the question.  

I think the real issue that some of the security folks want to check after the
fact that something happened instead of before it happend which is the correct
way to do anything.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |WONTFIX


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30475

Reply via email to