https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65547

--- Comment #7 from Edward Diener <eldlistmailingz at tropicsoft dot com> ---
(In reply to Jonathan Wakely from comment #5)
> And as has been documented forever, the way to get diagnostics for GNU
> extensions that contradict the ISO standard is the -pedantic switch:
> 
> https://gcc.gnu.org/onlinedocs/gcc-4.9.2/gcc/Warning-Options.html#index-
> pedantic-279
> 
> There is no bug here.

So the GNU extension in this case is that the programmer does not have to pass
an argument when a variadic parameter is used in a macro ? That would not even
bother me if there were a compiler flag which allowed it. But you appear to be
telling me that this non-C++ is by default. OK, how do I tell gcc to actually
follow the C++ standard ? Do I pass '-pedantic' for that ?

I realize gcc is used by many programmers and is loath to change the way it has
done things so as not to upset long-time users of the compiler. Nonetheless I
am going to suggest that the default should always be conformance to the C++
standard, and that GNU extensions should be turned on with some compiler
option.

Reply via email to