This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Patch: FYI: build interpreter with -fwrapv
- From: Tom Tromey <tromey at redhat dot com>
- To: GCJ-patches <java-patches at gcc dot gnu dot org>
- Date: 29 Jan 2007 09:18:58 -0700
- Subject: Patch: FYI: build interpreter with -fwrapv
- Reply-to: tromey at redhat dot com
I'm checking this in.
I noticed this weekend that we weren't building the interpreter with
-fwrapv. I know it is definitely needed there, as we assume java
semantics for math. I optimistically did not apply -fwrapv to all the
C++ code; once -Wstrict-overflow goes in we can revisit this.
Tom
Index: ChangeLog
from Tom Tromey <tromey@redhat.com>
* Makefile.in: Rebuilt.
* Makefile.am (interpret.lo): New target. Add -fwrap to
AM_CXXFLAGS.
Index: Makefile.am
===================================================================
--- Makefile.am (revision 121295)
+++ Makefile.am (working copy)
@@ -189,6 +189,9 @@
link.cc defineclass.cc interpret.cc verify.cc \
$(nat_source_files)
+## We need to compile at least the interpreter this way.
+interpret.lo: AM_CXXFLAGS += -fwrapv
+
if USING_BOEHMGC
libgcj_la_SOURCES += boehm.cc
endif