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]
Other format: [Raw text]

Re: changing "configure" to default to "gcc -g -O2 -fwrapv ..."



On Jan 1, 2007, at 12:16, Joseph S. Myers wrote:
For a program to be secure in the face of overflow, it will generally need
explicit checks for overflow, and so -fwrapv will only help if such checks
have been written under the presumption of -fwrapv semantics.

Yes, but often people do write such defensive code, and many such checks now get removed by gcc.

If I compute some value, I may check the result
before accessing an array or similar. Such local
defenses are of no use with current gcc without
-fwrapv.

-Grt


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