[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi] Warnings in gcc system headers [Was: wx-2.9.0-RC2 testing]
From: |
Greg Chicares |
Subject: |
[lmi] Warnings in gcc system headers [Was: wx-2.9.0-RC2 testing] |
Date: |
Sat, 09 May 2009 15:25:06 +0000 |
User-agent: |
Thunderbird 2.0.0.21 (Windows/20090302) |
On 2009-05-07 17:49Z, Vadim Zeitlin wrote:
> On Wed, 06 May 2009 21:07:54 +0000 Greg Chicares <address@hidden> wrote:
>
> GC> > excluding of
> GC> > GC> course a couple hundred lines like this:
> GC> > GC> stl_uninitialized.h:82: warning: '__cur' might be used
> uninitialized in this function
> GC> > GC> that I don't believe we can do anything about.
> GC> >
> GC> > Wouldn't using -isystem for this directory help?
> GC>
> GC> I have read the '-isystem' documentation. Let me ask which directory
> GC> you would suggest using it for: the wx source directory? If you mean
> GC> gcc's 'include/c++/3.4.5/bits/' directory, then...well, shouldn't
> GC> gcc already consider that a "system" directory?
>
> I think it should but I believe it doesn't, for whatever reason (mix up
> between DOS and Unix style paths is one thing coming to mind). Otherwise I
> don't see why should it give warnings in files inside it. Of course, this
> is, once again, untested so I could be totally wrong but I thought that
> using it for the directory containing stl_uninitialized.h might help.
Here's a small testcase that builds a lot faster:
make build_type=safestdlib \
CXXFLAGS='-isystem
C:/MinGW-20090203/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/
-Wno-system-headers'
unit_tests unit_test_targets=expression_template_0_test.exe
With or without 'CXXFLAGS' defined as above, I get:
C:/MinGW-20090203/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/debug/debug.h:
\
In instantiation of `_InputIterator __gnu_debug::__check_valid_range(const
_InputIterator&, const _InputIterator&) [with _InputIterator = double*]':
C:/MinGW-20090203/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/debug/vector:86:
\
instantiated from `__gnu_debug_def::vector<_Tp,
_Allocator>::vector(_InputIterator, _InputIterator, const _Allocator&) \
[with _InputIterator = double*, _Tp = double, _Allocator =
std::allocator<double>]' \
/lmi/src/lmi/expression_template_0_test.cpp:355: instantiated from here
C:/MinGW-20090203/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/debug/debug.h:395:
\
warning: unused parameter '__last'
make[1]: *** [expression_template_0_test.o] Error 1
Even adding '-Wno-system-headers' as above doesn't prevent this problem.
A similar problem for gcc-4 was reported here:
http://lists.apple.com/archives/Xcode-users//2006/Nov/msg00251.html
but received no reply. Here's a recent report for MinGW-gcc-3.4.5:
http://www.prog.org.ru/topic_7119_0.html
Also see:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30680
and
http://cygwin.com/ml/cygwin-apps/2005-06/msg00168.html
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22207
which suggests (in comment number five) modifying the system headers.
I'd rather not do that, so I'm very selectively suppressing the
warnings, e.g. as follows:
ifeq (safestdlib,$(findstring safestdlib,$(build_type)))
ifeq (3.4.5,$(gcc_version))
expression_template_0_test.o: gcc_common_extra_warnings +=
-Wno-unused-parameter
for lmi code, and using 'sed' to filter them out when building wx.