This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: c++/890
- To: Travis dot Moulton at motorola dot com (Travis Moulton)
- Subject: Re: c++/890
- From: Joe Buck <jbuck at racerx dot synopsys dot com>
- Date: Tue, 28 Nov 2000 10:38:58 -0800 (PST)
- Cc: nathan at codesourcery dot com (Nathan Sidwell), djm at cs dot mu dot oz dot au, gcc at gcc dot gnu dot org
>
> > Should this error be downgraded to a warning in the presence of
> > -fpermissive?
>
> Thoughts from the field (which I am out standing in ;-): I would like
> to see -fpermissive mean, "if it doesn't effect the output code, it's
> not an error."
That's not the purpose of the flag; it's to make some constructs that have
long been used work, even though they violate C++ (typically things that
used to be legal, or are legal in C but not C++ and commonly appear in
headers).
The most common use of -fpermissive right now is to be able to accept
X11R6 headers (at least, the original X11R6 headers) in C++ code, even
though they do things like
const foo = 23;
that aren't legal ISO C++ (no type is specified; C defaults to int).
> Any user who turns on the -fpermissive flag knows that
> they are doing something wacky.
Rather, they are trying to get old code to compile. That's not so wacky.
No one should be writing new code that needs -fpermissive; it's just a
measure to help ease the transition.