c-common.h (check_builtin_function_arguments): Declare.
authorRichard Guenther <rguenther@suse.de>
Thu, 24 Apr 2008 16:18:46 +0000 (16:18 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Thu, 24 Apr 2008 16:18:46 +0000 (16:18 +0000)
commit833229510cb13aa643a6005f60882daec616e2b7
tree35dd8b11788bce7a6dab65c4d291872b84068f45
parent194ac52ab4a35f22abafaec46ac22ac303a61ab8
c-common.h (check_builtin_function_arguments): Declare.

2008-04-24  Richard Guenther  <rguenther@suse.de>

* c-common.h (check_builtin_function_arguments): Declare.
* c-common.c (validate_nargs): New function.
(check_builtin_function_arguments): Likewise.
* c-typeck.c (build_function_call): Call
check_builtin_function_arguments.
* builtins.c (fold_builtin_classify): Remove error reporting code.
(fold_builtin_unordered_cmp): Likewise.
(fold_builtin_1): Likewise.
(fold_builtin_n): Likewise.

cp/
* typeck.c (cp_build_function_call): Call
check_builtin_function_arguments.

* gcc.dg/builtin-constant_p-1.c: New testcase.
* gcc.dg/builtin-errors.c: Adjust expected error.

From-SVN: r134635
gcc/ChangeLog
gcc/builtins.c
gcc/c-common.c
gcc/c-common.h
gcc/c-typeck.c
gcc/cp/ChangeLog
gcc/cp/typeck.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/builtin-constant_p-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/builtins-error.c