This is the mail archive of the gcc-patches@gcc.gnu.org mailing 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] |
Thanks, Andrew Pinski
ChangeLog: * c-typeck.c (c_expand_return): Add check for PARM_DECL.
cp/ChangeLog: * typeck.c (maybe_warn_about_returning_address_of_location): Add check for PARM_DECL.
Attachment:
warning.diff.txt
Description: Text document
int * f( int a) { return &a; /* { dg-warning "address" "" } */ }
int * g() { int b = 0;
return &b; /* { dg-warning "address" "" } */ }
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |