c/1623: GCC allows void function to return value
neel@eng.sun.com
neel@eng.sun.com
Thu Jan 11 14:56:00 GMT 2001
>Number: 1623
>Category: c
>Synopsis: GCC allows void function to return value
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Jan 11 14:56:00 PST 2001
>Closed-Date:
>Last-Modified:
>Originator: neel@eng.sun.com
>Release: 2.95.2 on solaris 7
>Organization:
>Environment:
solaris 7
>Description:
Gcc allows a void function to return a value. it only gives
a warning.
here is a demo code that demonstrates this.
/* demo.c */
void foo(int x)
{
return x;
}
>How-To-Repeat:
gcc -c demo.c
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the Gcc-bugs
mailing list