This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [C++ PATCH] Minor fix for warn_args_num
- From: Marek Polacek <polacek at redhat dot com>
- To: Jason Merrill <jason at redhat dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 21 May 2015 16:49:23 +0200
- Subject: Re: [C++ PATCH] Minor fix for warn_args_num
- Authentication-results: sourceware.org; auth=none
- References: <20150521134420 dot GL27320 at redhat dot com> <555DE79D dot 7000701 at redhat dot com>
On Thu, May 21, 2015 at 10:11:41AM -0400, Jason Merrill wrote:
> On 05/21/2015 09:44 AM, Marek Polacek wrote:
> >+ if (!DECL_BUILT_IN (fndecl))
>
> I think you want DECL_IS_BUILTIN. OK with that change.
Right. With DECL_IS_BUILTIN we print
q.c:1:5: note: declared here
int printf (const char *, ...);
^
even for
int printf (const char *, ...);
void
foo (void)
{
printf ();
}
C FE uses DECL_BUILT_IN so it doesn't print the note, but I think
we want it in this case, so I'll fix it up there. Thanks,
Marek