This is the mail archive of the
mailing list for the GCC project.
Re: -isystem and C++ headers
- From: Geoff Keating <geoffk at geoffk dot org>
- To: Daniel Jacobowitz <drow at false dot org>
- Cc: gcc at gcc dot gnu dot org
- Date: 11 May 2004 16:47:59 -0700
- Subject: Re: -isystem and C++ headers
- References: <20040511232405.GA4418@nevyn.them.org>
Daniel Jacobowitz <firstname.lastname@example.org> writes:
> c-opts.c says this:
> case OPT_isystem:
> add_path (xstrdup (arg), SYSTEM, 0);
> Is there a particular reason the third argument, cxx_aware, is not set?
> This means that anything included via -isystem will be marked with extern
> "C" by g++.
I expect this is because we don't have a separate -isystem-c++ flag,
and because the most typical use is something like
which would fail if those headers needed extern "C".
> This breaks the GDB testsuite in a combined tree, because all
> of libstdc++'s headers get marked as "system" headers. This isn't new, I
> don't think; I usually run my GDB testsuites using an installed compiler
> instead because I've had such a hard time getting combined trees to search
> in the tree instead of the install dir.
> The -isystem comes from DejaGNU, and has for a long time: see proc
> g++_include_flags in libgloss.exp. DejaGNU should probably be updated to
> invoke scripts/testsuite_flags instead. It looks like this aspect of
> -isystem hasn't changed since at least 3.2, but I'm still not sure it's
I think it would be just as good for dejagnu to not use -isystem when
testing in the build tree. -isystem also suppresses most kinds of warnings,
which is probably not what you want for a file in the build tree.
What does the libstdc++ testsuite itself do? It seems to work.
- Geoffrey Keating <email@example.com>