summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/20040920-1.c
diff options
context:
space:
mode:
authordberlin <dberlin@138bc75d-0d04-0410-961f-82ee72b054a4>2004-09-21 15:42:44 +0000
committerdberlin <dberlin@138bc75d-0d04-0410-961f-82ee72b054a4>2004-09-21 15:42:44 +0000
commitbee540cda577d1b9ebba9dede801c19d8f5ce6ae (patch)
tree2204defb2a1b87a08691c53ec1e9648bcdadb633 /gcc/testsuite/gcc.dg/20040920-1.c
parent1f0b839e917ac5c96486f54e96b5410dbfbf60a5 (diff)
downloadgcc-bee540cda577d1b9ebba9dede801c19d8f5ce6ae.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@87809 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.dg/20040920-1.c')
-rw-r--r--gcc/testsuite/gcc.dg/20040920-1.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/20040920-1.c b/gcc/testsuite/gcc.dg/20040920-1.c
new file mode 100644
index 00000000000..8813963f973
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/20040920-1.c
@@ -0,0 +1,12 @@
+/* { 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" } */
+}