This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Patch to add -pedantic -Wno-long-long to cc1plus build
- From: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- To: gcc-patches at gcc dot gnu dot org
- Date: Thu, 3 Apr 2003 16:05:49 -0500 (EST)
- Subject: Patch to add -pedantic -Wno-long-long to cc1plus build
This patch adds "-pedantic -Wno-long-long" when building cc1plus to
ensure we don't have any GNUC extensions reintroduced. It also
deletes a check for GNUC so we can use any ISO C copiler for building
cc1plus.
Tested with --enable-languages=c++ using cc and "make all" which
successfully built cc1plus with the solaris2 ISO C compiler.
I also did a full 3-stage bootstrap and verified that -pedantic
-Wno-long-long got passed to files in the cp/ dir.
Ok for mainline?
Thanks,
--Kaveh
2003-04-03 Kaveh R. Ghazi <ghazi at caip dot rutgers dot edu>
* Make-lang.in (cp-warn): Add $(STRICT_WARN).
* cp-tree.h: Don't insist on having GNUC.
diff -rup orig/egcc-CVS20030403/gcc/cp/Make-lang.in egcc-CVS20030403/gcc/cp/Make-lang.in
--- orig/egcc-CVS20030403/gcc/cp/Make-lang.in 2003-04-03 10:30:06.000000000 -0500
+++ egcc-CVS20030403/gcc/cp/Make-lang.in 2003-04-03 10:59:53.907088000 -0500
@@ -89,8 +89,8 @@ CXX_OBJS = cp/call.o cp/decl.o cp/expr.o
cp/search.o cp/semantics.o cp/tree.o cp/repo.o cp/dump.o \
cp/optimize.o cp/mangle.o cp/cp-lang.o cp/name-lookup.o
-# Use loose warnings for this front end.
-cp-warn = $(WERROR)
+# Use strict warnings for this front end.
+cp-warn = $(STRICT_WARN) $(WERROR)
cc1plus$(exeext): $(CXX_OBJS) $(CXX_C_OBJS) $(BACKEND) \
libcpp.a $(LIBDEPS)
diff -rup orig/egcc-CVS20030403/gcc/cp/cp-tree.h egcc-CVS20030403/gcc/cp/cp-tree.h
--- orig/egcc-CVS20030403/gcc/cp/cp-tree.h 2003-04-03 10:34:45.000000000 -0500
+++ egcc-CVS20030403/gcc/cp/cp-tree.h 2003-04-03 10:57:51.927540000 -0500
@@ -29,10 +29,6 @@ Boston, MA 02111-1307, USA. */
#include "splay-tree.h"
#include "varray.h"
-#ifndef __GNUC__
-#error "You should be using 'make bootstrap' -- see installation instructions"
-#endif
-
#include "c-common.h"
#include "name-lookup.h"