stdcxx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From se...@apache.org
Subject svn commit: r366347 - /incubator/stdcxx/trunk/etc/config/gcc.config
Date Fri, 06 Jan 2006 00:07:18 GMT
Author: sebor
Date: Thu Jan  5 16:07:15 2006
New Revision: 366347

URL: http://svn.apache.org/viewcvs?rev=366347&view=rev
Log:
2006-01-05  Martin Sebor  <sebor@roguewave.com>

	* gcc.config: Used := instead of plain assignment when invoking
	the $(shell) make function, for efficiency.
	Added -Wextra to the set of compiler options for gcc 3 and beyond.

Modified:
    incubator/stdcxx/trunk/etc/config/gcc.config

Modified: incubator/stdcxx/trunk/etc/config/gcc.config
URL: http://svn.apache.org/viewcvs/incubator/stdcxx/trunk/etc/config/gcc.config?rev=366347&r1=366346&r2=366347&view=diff
==============================================================================
--- incubator/stdcxx/trunk/etc/config/gcc.config (original)
+++ incubator/stdcxx/trunk/etc/config/gcc.config Thu Jan  5 16:07:15 2006
@@ -6,19 +6,23 @@
 ##############################################################################
 
 CXX             = gcc
-CCVER           = $(shell $(CXX) -dumpversion | sed "s/[^0-9]*\([0-9.]*\).*/\1/g")
+CCVER          := $(shell $(CXX) -dumpversion | sed "s/[^0-9]*\([0-9.]*\).*/\1/g")
 
 # determine the major version of gcc
-CXX_MAJOR       = $(shell echo "$(CCVER)" | sed "s/^\([1-9][0-9]*\).*/\1/")
-CXX_MINOR       = $(shell echo "$(CCVER)" | sed "s/[1-9]*\.\([0-9]*\).*/\1/")
+CXX_MAJOR      := $(shell echo "$(CCVER)" | sed "s/^\([1-9][0-9]*\).*/\1/")
+CXX_MINOR      := $(shell echo "$(CCVER)" | sed "s/[1-9]*\.\([0-9]*\).*/\1/")
 
-WARNFLAGS       = -Wall -W -Wcast-qual -Winline -Wshadow -Wwrite-strings
+WARNFLAGS       = -W -Wall -Wcast-qual -Winline -Wshadow -Wwrite-strings
 
 # -Wno-long-long not available prior to 2.90
 ifeq ($(shell [ $(CXX_MAJOR) -gt 2 -o $(CXX_MAJOR) -eq 2 -a $(CXX_MINOR) -ge 90 ] &&
echo 1), 1)
 WARNFLAGS      += -Wno-long-long
 endif   # gcc >= 2.90
 
+# enable additional warnings with gcc 3 and above
+ifneq ($(CXX_MAJOR),2)
+  WARNFLAGS += -Wextra
+endif
 
 # prevent (bogus?) warnings on SunOS
 ifneq ($(OSNAME),SunOS)



Mime
View raw message