This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]