Re: return void from void function is allowed.

2006-10-31 Thread Dale Johannesen
On Oct 31, 2006, at 12:49 PM, Igor Bukanov wrote: -- Forwarded message -- From: Igor Bukanov <[EMAIL PROTECTED]> Date: Oct 31, 2006 9:48 PM Subject: Re: return void from void function is allowed. To: Mike Stump <[EMAIL PROTECTED]> On 10/31/06, Mike Stump <[

return void from void function is allowed.

2006-10-31 Thread Igor Bukanov
-- Forwarded message -- From: Igor Bukanov <[EMAIL PROTECTED]> Date: Oct 31, 2006 9:48 PM Subject: Re: return void from void function is allowed. To: Mike Stump <[EMAIL PROTECTED]> On 10/31/06, Mike Stump <[EMAIL PROTECTED]> wrote: This is valid in C++.

Re: return void from void function is allowed.

2006-10-31 Thread Mike Stump
On Oct 31, 2006, at 12:21 PM, Igor Bukanov wrote: GCC 4.1.2 and 4.0.3 incorrectly accepts the following program: void f(); void g() { return f(); } No warning are issued on my Ubuntu Pentium-M box. Is it a known bug? If you want one: mrs $ gcc-4.2 -ansi -pedantic-errors t.c t.c: In funct

RE: return void from void function is allowed.

2006-10-31 Thread Dave Korn
On 31 October 2006 20:21, Igor Bukanov wrote: > GCC 4.1.2 and 4.0.3 incorrectly accepts the following program: > > void f(); > > void g() > { > return f(); > } > > No warning are issued on my Ubuntu Pentium-M box. Is it a known bug? > > Regards, Igor Yep. PR 5678. This patch worked f

return void from void function is allowed.

2006-10-31 Thread Igor Bukanov
GCC 4.1.2 and 4.0.3 incorrectly accepts the following program: void f(); void g() { return f(); } No warning are issued on my Ubuntu Pentium-M box. Is it a known bug? Regards, Igor