Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > b5e52bbfb4bb11a6cbed452927fba979 > files > 86

gcc-4.1.2-50.el5.src.rpm

2007-12-10  Jakub Jelinek  <jakub@redhat.com>

	PR c++/34394
	* error.c (dump_expr): Handle ABS_EXPR.

	* g++.dg/other/error22.C: New test.

--- gcc/cp/error.c	(revision 130743)
+++ gcc/cp/error.c	(revision 130744)
@@ -1757,6 +1757,7 @@ dump_expr (tree t, int flags)
       break;
 
     case SCOPE_REF:
+    case ABS_EXPR:
       pp_expression (cxx_pp, t);
       break;
 
--- gcc/testsuite/g++.dg/other/error22.C	(revision 0)
+++ gcc/testsuite/g++.dg/other/error22.C	(revision 130744)
@@ -0,0 +1,9 @@
+// PR c++/34394
+// { dg-do compile }
+
+extern double fabs (double);
+
+void foo (double x)
+{
+  fabs (x) ();	// { dg-error "__builtin_abs" }
+}