Manuel López-Ibáñez - PR 29521 Confusing warning for return with expression in function return (original) (raw)
This is the mail archive of the gcc-patches@gcc.gnu.orgmailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
- From: "Manuel López-Ibáñez"
- To: gcc-patches
- Date: Thu, 18 Jan 2007 18:00:21 +0000
- Subject: PR 29521 Confusing warning for return with expression in function returning void
:ADDPATCH c:Simple fix for PR 29521. Given the testcase:
void func () { }
void func2 () { return func (); }
The patch replaces⚠️ 'return' with a value, in function returning voidwith:ISO C forbids 'return' with expression in function returning voidOK for mainline?2007-01-20 Manuel Lopez-Ibanez manu@gcc.gnu.org
PR c/29521
- c-typeck.c (c_finish_return): Improve warning message.
testsuite/
- gcc.dg/c90-return-1.c: Update output.
- gcc.dg/c99-return-1.c: Likewise.
Attachment:return-void-msg.diff
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |