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:
-testsys.h----8<--------
#pragma GCC system_header
#define __glibcpp_function_requires(...)
-testsys.h---->8--------

-test.h----8<-----------
#include"testsys.h"
-test.h---->8-----------

-test.cc---8<-----------
#include"test.h"
-test.cc--->8-----------

Script:
-t---8<-----------
#!/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
-t--->8-----------

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

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 .

Vladimir

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=10470




More information about the Gcc-bugs mailing list