-isystem and C++ headers

Daniel Jacobowitz drow@false.org
Tue May 11 23:24:00 GMT 2004


c-opts.c says this:

    case OPT_isystem:
      add_path (xstrdup (arg), SYSTEM, 0);
      break;

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++.  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
right.

-- 
Daniel Jacobowitz



More information about the Gcc mailing list