This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [C PATCH] Fix missing warning (PR c/67730)
- From: Marek Polacek <polacek at redhat dot com>
- To: Marc Glisse <marc dot glisse at inria dot fr>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Joseph Myers <joseph at codesourcery dot com>
- Date: Tue, 29 Sep 2015 18:15:40 +0200
- Subject: Re: [C PATCH] Fix missing warning (PR c/67730)
- Authentication-results: sourceware.org; auth=none
- References: <20150929155514 dot GG6184 at redhat dot com> <alpine dot DEB dot 2 dot 20 dot 1509291801300 dot 1715 at laptop-mg dot saclay dot inria dot fr>
On Tue, Sep 29, 2015 at 06:04:55PM +0200, Marc Glisse wrote:
> 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 assume this means that the other missing warning from
> http://stackoverflow.com/questions/32732281/no-warning-when-returning-null-with-gcc
> (same code but change the return type from void to int)
> is not fixed at the same time?
Nope, I wasn't aware of that one :(. Maybe we want the
loc = expansion_point_location_if_in_system_header (loc);
line after all...
Marek