[Bug preprocessor/61389] New: libcpp diagnostics shouldn't talk about ISO C99 for C++ input files
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Jun 2 10:58:00 GMT 2014
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61389
Bug ID: 61389
Summary: libcpp diagnostics shouldn't talk about ISO C99 for
C++ input files
Product: gcc
Version: 4.10.0
Status: UNCONFIRMED
Keywords: diagnostic
Severity: normal
Priority: P3
Component: preprocessor
Assignee: unassigned at gcc dot gnu.org
Reporter: redi at gcc dot gnu.org
#define V(A, ...) __VA_ARGS__
void f() {
V(1);
}
$ g++ v.cc -pedantic -c
v.cc:1:14: warning: anonymous variadic macros were introduced in C99
[-Wvariadic-macros]
#define V(A, ...) __VA_ARGS__
^
v.cc:3:5: warning: ISO C99 requires rest arguments to be used [enabled by
default]
V(1);
^
v.cc:3:5: warning: invoking macro V argument 2: empty macro arguments are
undefined in ISO C90 and ISO C++98 [enabled by default]
1) The reference to C99 is not relevant for C++
2) the term "rest arguments" is not defined by any standard, or AFAICT the GCC
docs, and is confusing
Similarly:
$ g++ -pedantic -c v.cc -std=c++11
v.cc:1:13: warning: ISO C99 requires whitespace after the macro name [enabled
by default]
#define PLUS+
^
This should say C++11 no C99
More information about the Gcc-bugs
mailing list