* typeck.c (warn_args_num): Don't print "declare here" for builtins.
authorMarek Polacek <polacek@redhat.com>
Thu, 21 May 2015 15:27:12 +0000 (15:27 +0000)
committerMarek Polacek <mpolacek@gcc.gnu.org>
Thu, 21 May 2015 15:27:12 +0000 (15:27 +0000)
From-SVN: r223489

gcc/cp/ChangeLog
gcc/cp/typeck.c

index b4c60b651cc499f76ba2339a114b9adf9ed2bf61..6460314253142b0c3fbb99566d3c7000d20252fd 100644 (file)
@@ -1,3 +1,7 @@
+2015-05-21  Marek Polacek  <polacek@redhat.com>
+
+       * typeck.c (warn_args_num): Don't print "declare here" for builtins.
+
 2015-05-20  Jason Merrill  <jason@redhat.com>
 
        * pt.c (tsubst_decl) [VAR_DECL]: SET_DECL_IMPLICIT_INSTANTIATION
index ba99c302cde9b1af1df771b69d90d6b2b5dd454c..fef4f4f1304ab84ef8d134586ae90e153790866f 100644 (file)
@@ -3598,8 +3598,8 @@ warn_args_num (location_t loc, tree fndecl, bool too_many_p)
                  ? G_("too many arguments to function %q#D")
                  : G_("too few arguments to function %q#D"),
                  fndecl);
-      inform (DECL_SOURCE_LOCATION (fndecl),
-             "declared here");
+      if (!DECL_IS_BUILTIN (fndecl))
+       inform (DECL_SOURCE_LOCATION (fndecl), "declared here");
     }
   else
     {