On Tue, 29 Sep 2015, Marek Polacek wrote: > This fixes missing warning for the attached testcase. In such a case, > we must use the expansion point location. I didn't simply add > loc = expansion_point_location_if_in_system_header (loc); > as might be seen elsewhere in the codebase because we pass LOC down to > convert_for_assignment where many of the warnings are issued and I was > nervous about passing a different location there.
I suppose that for the convert_for_assignment cases you should warn if the user's code is in any way responsible for the issue, which includes if a user's function returns a wrong-type macro defined in a system header (or for that matter if a system header contains a return but the user chose the argument to that return, but that seems much less likely). > Bootstrapped/regtested on x86_64-linux, ok for trunk and 5? OK (though followups may be needed for any other issues). -- Joseph S. Myers jos...@codesourcery.com