This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCHv3] Add a warning for invalid function casts
- From: Jason Merrill <jason at redhat dot com>
- To: Bernd Edlinger <bernd dot edlinger at hotmail dot de>
- Cc: Martin Sebor <msebor at gmail dot com>, Jeff Law <law at redhat dot com>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, Joseph Myers <joseph at codesourcery dot com>
- Date: Wed, 6 Dec 2017 17:35:55 -0500
- Subject: Re: [PATCHv3] Add a warning for invalid function casts
- Authentication-results: sourceware.org; auth=none
- References: <AM5PR0701MB265700BCFDF7620223717DCCE4720@AM5PR0701MB2657.eurprd07.prod.outlook.com> <43dcb212-0c40-f55c-61a0-84a5c149695e@gmail.com> <AM5PR0701MB2657697940DE7A81A479CF20E4740@AM5PR0701MB2657.eurprd07.prod.outlook.com> <4abe4931-7cee-81d2-1019-6834006d396e@gmail.com> <AM5PR0701MB265758B1D2D4F227716BA923E4740@AM5PR0701MB2657.eurprd07.prod.outlook.com> <87146b27-e57b-0f0d-bd14-53a2c2acd67c@redhat.com> <40891950-f967-1ce6-3cc9-8595cde9a133@hotmail.de> <CADzB+2mvudrJ5rp5_GujKTL5UjySjD2B_pEpW=+0m8D9ypjr4g@mail.gmail.com> <AM5PR0701MB265795768D78BACF3C350376E4380@AM5PR0701MB2657.eurprd07.prod.outlook.com> <CADzB+2=__g1yojLZHc47inaugoO4zCKRw_f6PmmOs_ELM7am-A@mail.gmail.com> <AM5PR0701MB2657C441A17E36768453C466E4380@AM5PR0701MB2657.eurprd07.prod.outlook.com> <CADzB+2=bt8SSu=pHn6d3r=aFCJKV4mmc9D3RmYJ=1VzjLWmJng@mail.gmail.com> <AM5PR0701MB2657479575BEA81366552BD3E4380@AM5PR0701MB2657.eurprd07.prod.outlook.com> <CADzB+2kQx6ExiO7bGf6UhWEC8wLZHB+3bpkc16n5=BDDzE4DTg@mail.gmail.com> <AM5PR0701MB26573F24B606519E3CA56997E4390@AM5PR0701MB2657.eurprd07.prod.outlook.com>
On Fri, Dec 1, 2017 at 7:42 AM, Bernd Edlinger
<bernd.edlinger@hotmail.de> wrote:
> this version of the patch improves the heuristic check to take the
> target hook into account, to handle cases correctly when both or only
> one parameter is _not_ promoted to int.
In looking at this, I discovered that the argument to
promote_prototypes should be the function type, not the parameter
type; the existing uses in the C++ front end were wrong.
Jason