The other day there was a request for a compile error if you do:
int foo(void) { }
and the answer was the standard says that this is legal -- after all,
you can say 'foo();' so the return value isn't used and it doesn't
matter that it's missing.
That makes sense.
So how about:
int foo
On Wed, Apr 01, 2009 at 10:18:32AM -0700, Paul Koning wrote:
The other day there was a request for a compile error if you do:
int foo(void) { }
and the answer was the standard says that this is legal -- after all,
you can say 'foo();' so the return value isn't used and it doesn't
Joe == Joe Buck joe.b...@synopsys.com writes:
Joe On Wed, Apr 01, 2009 at 10:18:32AM -0700, Paul Koning wrote:
The other day there was a request for a compile error if you do:
int foo(void) { }
and the answer was the standard says that this is legal -- after
all, you can say
inlined
which clearly is bogus as the branch is *always* taken.
--
Summary: bogus warning for missing return value
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c
AssignedTo
|
Keywords||diagnostic
Resolution||FIXED
Summary|bogus warning for missing |[4.0 Regression] bogus
|return value|warning for missing return