+2008-07-03 Richard Guenther <rguenther@suse.de>
+
+ PR c++/36128
+ * typeck.c (cp_build_function_call): Move code to verify
+ builtin function arguments ...
+ * call.c (build_cxx_call): ... here.
+
2008-07-02 Jason Merrill <jason@redhat.com>
* Make-lang.in (cp/typeck2.o): Add $(REAL_H) dependency.
&& cfun)
cp_function_chain->can_throw = 1;
+ /* Check that arguments to builtin functions match the expectations. */
+ if (fndecl
+ && DECL_BUILT_IN (fndecl)
+ && DECL_BUILT_IN_CLASS (fndecl) == BUILT_IN_NORMAL
+ && !check_builtin_function_arguments (fndecl, nargs, argarray))
+ return error_mark_node;
+
/* Some built-in function calls will be evaluated at compile-time in
fold (). */
fn = fold_if_not_in_template (fn);
if (nargs < 0)
return error_mark_node;
- /* Check that arguments to builtin functions match the expectations. */
- if (fndecl
- && DECL_BUILT_IN (fndecl)
- && DECL_BUILT_IN_CLASS (fndecl) == BUILT_IN_NORMAL
- && !check_builtin_function_arguments (fndecl, nargs, argarray))
- return error_mark_node;
-
/* Check for errors in format strings and inappropriately
null parameters. */
check_function_arguments (TYPE_ATTRIBUTES (fntype), nargs, argarray,
+2008-07-03 Richard Guenther <rguenther@suse.de>
+
+ PR c++/36128
+ * g++.dg/other/builtin1.C: New testcase.
+
2008-07-02 Joseph Myers <joseph@codesourcery.com>
* g++.dg/compat/struct-layout-1.exp: Compile generator on build
--- /dev/null
+/* { dg-do compile } */
+
+void foo()
+{
+ __builtin_isless (foo, 0); /* { dg-error "non-floating-point arguments" } */
+}