This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ 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]

Warnflags in libstdc++-v3



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

Attachment: pgp00000.pgp
Description: PGP signature


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