c++/10470: [pch] spurious warning about "anonymous variadic macros were introduced in C99"

Vladimir Merzliakov wanderer@rsu.ru
Mon Apr 28 14:26:00 GMT 2003

I prepare more simple testcase (now it not use any GCC headers)
Sorry, i can't provide test.ii file (in this case bug isn't catched
and test.cc compile fine with and without using PCH)

Needed files:
#pragma GCC system_header
#define __glibcpp_function_requires(...)



#!/bin/sh -
rm *.gch
echo !!! Compile without gch
g++ -ansi -Werror -pedantic -Winvalid-pch -o test.o -c test.cc
echo !!! GCH generation
g++ -ansi -Werror -pedantic -Winvalid-pch -o test.h.gch -c test.h
echo !!! Compile with gch
g++ -ansi -Werror -pedantic -Winvalid-pch -o test.o -c test.cc

generate output:
!!! Compile without gch
!!! GCH generation
!!! Compile with gch
test.cc:42:2: anonymous variadic macros were introduced in C99

GCC in PCH mode don't remember "#pragma GCC system_header" in testsys.h
Also error location (test.cc:42:2) is invalid.

I use for testing gcc version 3.4 20030428 (experimental)
at FreeBSD 4.7-RELEASE-p9 .



More information about the Gcc-bugs mailing list