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: Changes in C++ FE regarding pedwarns to be errors are harmful


Andrew Pinski wrote:
On 1/8/08, Ismail DÃnmez <ismail@pardus.org.tr> wrote:
Oh that clears up my confusion. So the right fix would be downgrading this
redefinition problem to be pedwarn instead. But I see no point in creating a
bug report if its just gonna be closed as invalid, so I hope we can discuss
if its feasible to downgrade this error to be a pedwarn.

It is already a pedwarn. Just the C++ front-end enables pedwarn as being errors by default and downgrades them as being warnings with -fpermissive. This is the whole point of -fpermissive.

Not at all!!! -fpermissive can (in weird cases, agreed) change code generation. I'm pretty sure you don't want to risk that only to silence an error.


I wonder if this requires a new diagnostic category, something like:

  if (pedantic)
    pedwarn ("...")
  else
    warning ("...")

Paolo


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