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++?


>From GCC's manual:
-pedantic      
Issue all the warnings demanded by strict ISO C and ISO C++; reject all programs that use forbidden extensions, and some other programs that do not follow ISO C and ISO C++.  For ISO C, follows the version of the ISO C standard specified by any -std option used.       
Valid ISO C and ISO C++ programs should compile properly with or without this option (though a rare few will require -ansi or a -std option specifying the required version of ISO C).  However, without this option, certain GNU extensions and traditional C and C++ features are supported as well.  With this option, they are rejected.

I interpute this as it can error for "all programs that use forbidden extensions", long long looks like to be one of these.
Even though "long long" might become part of the C++ standard in C++0x is not really the issue at this point.
Also mozilla is already fixed in the cvs versions any way as you can see by reading the mozilla bug report linked from GCC's bug report.

Thanks,
ANdrew Pinski


> 
> On Wed, Aug 13, 2003 at 04:59:05PM -0400, Andrew Pinski wrote:
> > 
> > There was already a PR for this, PR 11720 <http://gcc.gnu.org/PR11720>
> > 
> > I closed it because it looked like mozilla was testing the wrong thing when it was configuring.
> > It looked like there was some wrong-code bug that mozilla was running into with long long and one of the tests mozilla foundd it was only when -pedantic errored out about long long's.
> > The test mozilla should have been running was testing for the wrong-code instead of the pedantic erroring for long long.
> 
> I think you were possibly too hasty in closing that PR.  Yes, mozilla is
> testing for some bug which appears to have existed once upon a time, but
> it doesn't get as far as trying the test because g++ -pedantic refuses to
> compile the testcase.
> 
> So there's agreement that g++ -pedantic should only be emitting a warning
> and not an error?
> 
> -- 
> "It's not Hollywood.  War is real, war is primarily not about defeat or
> victory, it is about death.  I've seen thousands and thousands of dead bodies.
> Do you think I want to have an academic debate on this subject?" -- Robert Fisk
> 
> 


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