This is the mail archive of the newlib@sourceware.org mailing list for the newlib 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]

GCC 4.2 -fstrict-overflow


The recent thread concerning the behavior of the optimized strstr()
function indirectly raises the question of behavior with signed
overflow.
Starting with GCC 4.2, they added the -fstrict-overflow option, which is
on by default with -O2.  (See http://gcc.gnu.org/gcc-4.2/changes.html)
(The strstr line in question is unsigned by virtue of being size_t, and
so could not be affected.)  Along with this, the -Wstrict-overflow
option
has been added (and is part of -Wall) to emit a warning when these
constructs are found.  I don't yet have access to 4.2 or 4.3.  Has
anyone
done a Newlib build with GCC 4.2 or later and looked for warnings
related
to this?
				Craig Howland


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