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: ANSI C++ forbids 'const' w/out type


thanx a lot!

Gabriel Dos Reis wrote:

> Joe Buck <jbuck@synopsys.COM> writes:
>
> | Andy Rysin <avrysin@ibscorp.com> writes:
> |
> | > | Recently tried to compile QT-2.0.2 under Solaris 7 with gcc-2.95 and got
> | > | errors in /usr/openwin/include/*.h
> | > | ANSI C++ forbids 'const' w/out type
> | > |
> | > | can it be switched off for backward compatibility or shall I switch back
> | > | to egcs-1.1.2?
> |
> | Gaby writes:
> |
> | > Use
> | >
> | >     -isystem /usr/openwin/include
> |
> | The FAQ recommendation is -fpermissive.
>
> But then the flag is applyed to the *whole* translation unit, and one
> misses hot sopts in user program.  Also you get tons of warnings that
> cpmpletely  hide the useful ones.
>
> What if you just want the compiler be silent about *system* header
> files? (I consider /usr/openwin/include/* as being system header
> files).
>
> | ...   The problem is that Sun's
> | X headers are buggy, you can't write
> |
> | const foo = 2;
> |
> | in ISO C++.
>
> Yeah, I know.
>
> -- Gaby


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