This is the mail archive of the gcc-bugs@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]

[Bug c/67730] [5/6 Regression] No warning when returning NULL in void function


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67730

--- Comment #1 from joseph at codesourcery dot com <joseph at codesourcery dot com> ---
Probably caused by:

r211978 | mpolacek | 2014-06-25 12:43:05 +0000 (Wed, 25 Jun 2014) | 7 
lines

        PR c/61162
        * c-parser.c (c_parser_statement_after_labels): Pass the location of
        the return expression to c_finish_return.

        * gcc.dg/pr61162.c: Adjust dg-warning.
        * gcc.dg/pr61162-2.c: New test.

For this warning, either it should use the location of the return keyword, 
or (maybe better) it should use the location of the return value before 
macro expansion - not the location of the macro definition - since this 
diagnostic is about the context in which the expression is used, not the 
contents of that expression.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]