This is the mail archive of the gcc-patches@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: [C/C++] PR 13358 long long and C++ do not mix well


2008/8/29 Joseph S. Myers <joseph@codesourcery.com>:
> On Fri, 29 Aug 2008, Manuel López-Ibáñez wrote:
>
>> CPP and the FE were using different semantics. invoke.texi said that
>> Wlong-long was the default. This was not correct. It was the default
>> for CPP but -Wno-long-long was the default for the FE. Now there is
>> only one semantic: the one from the FE.
>>
>> However, we were inhibiting warning even if the user requested it
>> through Wlong-long. Now explicit Wlong-long (or Wno-long-long)
>> overrides everything else, except in system headers.
>
> If you allow -Wlong-long to have an effect in C99 mode, -std=c99
> -pedantic-errors -Wlong-long should give the diagnostics as warnings not
> errors.  Does it?

No but I can make it do that just using pedwarn_c90 instead of pedwarn
and add a testcase. I'll do the same for c++98. I''ll need to add an
equivalent of pedwarn_c90 to C++ and CPP. In C++ is probably easy.

Is there a way to tell in CPP if we are being called from the C++ FE?
and which standard? I cannot find anything in the sources apart from
CPP_OPTION (pfile, c99).

Cheers,

Manuel.


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