ANSI C++ on g++ 2.95.1

Mumit Khan khan@xraylith.wisc.edu
Wed Oct 6 08:15:00 GMT 1999


In article < 7tflig$qi4$1@nnrp1.deja.com >,  <john_hannon@my-deja.com> wrote:
>I'm currently compiling a very large legacy c++ program with g++ 2.95.1
>The code has a large number of routines which were declared without
>return types [i.e f() rather than int f() ]  The compiles fail with the
>message "ANSI c++ forbids declaration of 'f' with no return return type"
>Is there a compiler option to relax the ansi standard of must I
>spend a large portion of the remainder on my life adding return types to
>every function in the code?

A look at the GCC docs that accompany gcc-2.95.1 should've given you
the answer (`info gcc invoking c++`).

See GCC documentation for -fpermissive option (C++ only). It's a bad
idea to have to use it for obvious reasons. 

Regards,
Mumit



More information about the Gcc-help mailing list