This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: How do I run "make check" in gcc with libstdc++-v3?
In article <20000515222748.L6082@wolery.cumb.org>,
Zack Weinberg <zack@wolery.cumb.org> writes:
>> [...] The only ways I see to get rid of those
>> failures is (1) to find libstdc++-v3 headers with -isystem instead of
>> -I while testing [good luck finding the right order for -isystem
>> arguments given the current interactions with -B]
> I just had an idea. System-header-ness can be forced on with #line,
> sort of - you'd write
> #line 2 "header.h" 3
> at the very top of the file, and that *should* suppress -pedantic
> warnings in the rest of the file.
Sorry, but unless I did something else dumb, when in ``-ansi
-pedantic-errors'' mode, this error results:
.../libstdc++-v3/bits/std_exception.h:33:33: garbage at end of `#line' command
when this line is seen:
#line 37 "bits/std_typeinfo.h" 3
However, it does remove the ISO C violation errors later when
#include_next is processed. ;-)
> This is not suitable for general
> use because (a) it's an obscure extension, and (b) it means errors in
> the rest of the file will not carry information about the path to the
> file (so e.g. emacs compilation-mode won't be able to find it). But
> we could have a thingy that just forced system-header-ness on and
> didn't do anything else: something like #pragma system_header is
> probably the appropriate interface.
> What do people think of this idea? It is absolutely trivial to
> implement if we like it. It can be rejected in the primary source
> file, which would prevent most of the abuses I can think of right now.
Although I think we are just kludging something to circumvent other
issues, #pragma system_header would solve the final issue at hand in
conjunction with HJ's patch to allow `make check-g++' against
libstdc++-v3 in place before final installation or any
pre-install-of-headers step.
Regards,
Loren