public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* ANSI C++ on g++ 2.95.1
@ 1999-10-06  7:36 john_hannon
  1999-10-06  8:15 ` Mumit Khan
  1999-10-31 13:57 ` john_hannon
  0 siblings, 2 replies; 4+ messages in thread
From: john_hannon @ 1999-10-06  7:36 UTC (permalink / raw)
  To: help-gcc

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?

John


Sent via Deja.com http://www.deja.com/
Before you buy.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: ANSI C++ on g++ 2.95.1
  1999-10-06  7:36 ANSI C++ on g++ 2.95.1 john_hannon
@ 1999-10-06  8:15 ` Mumit Khan
  1999-10-31 13:57   ` Mumit Khan
  1999-10-31 13:57 ` john_hannon
  1 sibling, 1 reply; 4+ messages in thread
From: Mumit Khan @ 1999-10-06  8:15 UTC (permalink / raw)
  To: help-gcc

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* ANSI C++ on g++ 2.95.1
  1999-10-06  7:36 ANSI C++ on g++ 2.95.1 john_hannon
  1999-10-06  8:15 ` Mumit Khan
@ 1999-10-31 13:57 ` john_hannon
  1 sibling, 0 replies; 4+ messages in thread
From: john_hannon @ 1999-10-31 13:57 UTC (permalink / raw)
  To: help-gcc

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?

John


Sent via Deja.com http://www.deja.com/
Before you buy.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: ANSI C++ on g++ 2.95.1
  1999-10-06  8:15 ` Mumit Khan
@ 1999-10-31 13:57   ` Mumit Khan
  0 siblings, 0 replies; 4+ messages in thread
From: Mumit Khan @ 1999-10-31 13:57 UTC (permalink / raw)
  To: help-gcc

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~1999-10-31 13:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-10-06  7:36 ANSI C++ on g++ 2.95.1 john_hannon
1999-10-06  8:15 ` Mumit Khan
1999-10-31 13:57   ` Mumit Khan
1999-10-31 13:57 ` john_hannon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).