Warnflags in libstdc++-v3

Andreas Jaeger aj@suse.de
Sat Jan 8 08:20:00 GMT 2005



I noticed that in one of my runs I got some warnings - which I didn't
get in other.  Investigating this, I noticed that we use WARN_FLAGS
with warnings - but do not use those flags everywhere.

My generated src/Makefile has:
CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
WARN_FLAGS = -Wall -Wextra -Wwrite-strings -Wcast-qual
WARN_CXXFLAGS = \
	$(WARN_FLAGS) $(WERROR) -fdiagnostics-show-location=once

AM_CXXFLAGS = \
	-fno-implicit-templates \
	$(WARN_CXXFLAGS) \
	$(OPTIMIZE_CXXFLAGS) \
	$(CONFIG_CXXFLAGS)

LTCXXCOMPILE = $(LIBTOOL) --tag CXX --mode=compile $(CXX) $(INCLUDES) \
	       $(AM_CPPFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(AM_CXXFLAGS)

.cc.o:
	$(CXXCOMPILE) -c -o $@ $<

.cc.lo:
	$(LTCXXCOMPILE) -c -o $@ $<

So, we only use the WARNFLAGS for lo to cc - but not for normal object
files, e.g. for testsuite_abi.

What's the best way to fix?  I think we should use the same warnings
for both .o and .lo files, shouldn't we?

Andreas

P.S. the warnings are:
../../../../libstdc++-v3/testsuite/testsuite_abi.cc: In function ‘symbol& get_symbol(const std::string&, const symbols&)’:
../../../../libstdc++-v3/testsuite/testsuite_abi.cc:268: warning: control reaches end of non-void function

-- 
 Andreas Jaeger, aj@suse.de, http://www.suse.de/~aj
  SUSE Linux Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
   GPG fingerprint = 93A3 365E CE47 B889 DF7F  FED1 389A 563C C272 A126
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 188 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20050108/f53cbb71/attachment.sig>


More information about the Libstdc++ mailing list