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]

: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

testsuite/

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]