Why does -pedantic make long long an error in C++?

Erik Trulsson ertr1013@student.uu.se
Thu Aug 14 15:45:00 GMT 2003


On Wed, Aug 13, 2003 at 02:43:43PM -0700, Joe Buck wrote:
> There's no argument on this issue: -pedantic is supposed to issue only
> warnings.  It's a bug.

If that is the case the documentation is also wrong and has been so for
a very long time.

The description of what the '-pedantic' option does says (in part):
"reject all programs that use forbidden extensions."
(That particular phrase has been in the description of -pedantic since
at least gcc-1.41 and is still there for gcc-3.3.1 so it is not like it
is a recent addition.)

This means that according to the documentation the compiler *should*
issue an error when you are trying to compile a program which uses
certain non-standard extensions to the language (like use of 'long
long' in C++ programs.)

If you read what the documentation has to say about -pedantic, I think
it is quite clear that using -pedantic is supposed to cause C++
programs using 'long long' to be rejected.


In other words:  Long standing convention (as evidenced by the
documentation) is that '-pedantic' is supposed to issue errors in
certain situations (and issue warnings in many other situations.)




-- 
<Insert your favourite quote here.>
Erik Trulsson
ertr1013@student.uu.se



More information about the Gcc mailing list