This is the mail archive of the 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 Sat, Aug 16, 2003 at 11:51:43AM +0200, Gabriel Dos Reis wrote:
> (Kai Henningsen) writes:
> | (1) It is unclear to me why one would want to have -pedantic do *anything*  
> | to a condition that already causes an error without -pedantic. That seems  
> | to me to be a misuse of the concept.
> It is unclear to me why one would have to say *pedantic* when the
> issue is to avoid (inadvertently) depending on a language extension.
> That whole name is a misuse of concept.  It contributes to making
> students and/or programmers confused -- because of the very
> condescending name, some just tend to ignore the whole thing; first
> hand experience as teacher and trainer. 

Remember the original purpose of '-pedantic'.
In older releases one could find the following in the description o
     However, without this option, certain GNU extensions and
     traditional C and C++ features are supported as well.  With this
     option, they are rejected.
     This option is not intended to be useful; it exists only to satisfy
     pedants who would otherwise claim that GCC fails to support the
     ANSI standard.

(This second paragraph seems to have been removed from the documentation in the
latest releases.)

So, if the '-pedantic' option has weird semantics and is of limited
usefulness, one should blame it on historical reasons:  It was not
intended to be used or to be useful. It was only intended to satisfy
pedants; hence the name.

(Historically the GCC developers tended to encourage people to use the
gcc extensions whenever it was convenient and not to worry too much
about standards-compliance of programs. This attitude has changed over
the years.)

<Insert your favourite quote here.>
Erik Trulsson

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