Bug 53858 - gcc warns on function prototype with incomplete type
gcc warns on function prototype with incomplete type
Status: CLOSED UPSTREAM
Product: Red Hat Linux
Classification: Retired
Component: gcc (Show other bugs)
7.1
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-09-19 22:31 EDT by Ben LaHaise
Modified: 2007-04-18 12:37 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-10-07 08:49:29 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Ben LaHaise 2001-09-19 22:31:41 EDT
Compiling the below program produces a warning when it should not.  This
bug is also present in the gcc3 package.  Cheers!

[bcrl@toomuch ~]$ gcc -Wall -o /dev/null gcc-warning.c 
gcc-warning.c:4: warning: parameter has incomplete type

... gcc-warning.c ...
struct iocb;
struct foo {
	void (*bar)(struct iocb);
};
Comment 1 Jakub Jelinek 2001-09-24 05:34:51 EDT
It is true that ISO C99 allows incomplete types in function prototypes, on the
other side I don't think it forbids such a warning. I'll ask Joseph what he
thinks about it.
Comment 2 Jakub Jelinek 2004-10-07 08:49:29 EDT
Tracked upstream: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17881

Note You need to log in before you can comment on or make changes to this bug.