Re: [C++ PATCH] Minor fix for warn_args_num

2015-05-21 Thread Marek Polacek
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

[C++ PATCH] Minor fix for warn_args_num

2015-05-21 Thread Marek Polacek
I've just noticed that we print note: declared here even for builtins. E.g.: void foo (void) { __builtin_return (); } q.cc: In function ‘void foo()’: q.cc:4:21: error: too few arguments to function ‘void __builtin_return(void*)’ __builtin_return (); ^ built-in: note:

Re: [C++ PATCH] Minor fix for warn_args_num

2015-05-21 Thread Jason Merrill
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. Jason