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]

Re: typedef vs. typename confusion



> > If you want an anal-retentive compiler, feel free to use -pedantic, don't
> > try to impose it on others.
> 
> I think it's the other way around.  Why allow people to unknowingly
> write sloppy code.

If compilers were used only by people writing new code, you would have a
case.  But most people using compilers are compiling at least some old
code, or other people's code.

The requirement for "typename" is a recent change.  It is not mentioned in
the ARM, and other than HP, no compiler with significant market share
requires it.  People who rigorously followed the ARM when they wrote
their template-based code in 1992 didn't use typename.

If we make the requirement for typename the default, people suddenly
cannot compile lots of free software.  If egcs's main purpose were for
commercial developers, maybe 

> If they want to write non-compliant code, they
> should know it's non-compliant and, therefore, should be the ones to
> specify a flag.

If we were starting gcc/g++ today, that might be a reasonable decision
to make: have -pedantic on by default and have some flags to relax
the insistence on performance.

You, Noel, may use an alias so that when you type gcc you get
gcc -pedantic.  You may report as bugs any case where -pedantic does
not enforce a rule.  But it's not reasonable to demand, after more
than a decade of success, that gcc suddenly change its basic philosophy.






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