2004-09-21 Daniel Berlin <dberlin@dberlin.org>
* c-typeck.c (build_function_call): Give name of object
we are attempting to call in error message.
* c-objc-common.c (c_tree_printer): Call pp_expression,
not return false, for 'E' case.
From-SVN: r87809
+2004-09-21 Daniel Berlin <dberlin@dberlin.org>
+
+ * c-typeck.c (build_function_call): Give name of object
+ we are attempting to call in error message.
+ * c-objc-common.c (c_tree_printer): Call pp_expression,
+ not return false, for 'E' case.
+
2004-09-21 Steven Bosscher <stevenb@suse.de>
PR rtl-optimization/17482
if (TREE_CODE (t) == IDENTIFIER_NODE)
n = IDENTIFIER_POINTER (t);
else
- return false;
+ pp_expression (cpp, t);
break;
default:
if (!(TREE_CODE (fntype) == POINTER_TYPE
&& TREE_CODE (TREE_TYPE (fntype)) == FUNCTION_TYPE))
{
- error ("called object is not a function");
+ error ("called object %qE is not a function", function);
return error_mark_node;
}
--- /dev/null
+/* { dg-do compile } */
+int bob;
+struct a
+{
+ int foo;
+};
+int main(void)
+{
+ struct a bar;
+ bob(5); /* { dg-error "called object 'bob\\({anonymous}\\)' is not a function" } */
+ bar.foo(); /* { dg-error "called object 'bar.foo\\({anonymous}\\)' is not a function" } */
+}