PR c++/35332
* error.c (dump_expr): Pass {,UN}ORDERED_EXPR, UN{LT,LE,GT,GE,EQ}_EXPR
and LTGT_EXPR to pp_expression.
* g++.dg/other/error27.C: New test.
From-SVN: r133600
+2008-03-26 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/35332
+ * error.c (dump_expr): Pass {,UN}ORDERED_EXPR, UN{LT,LE,GT,GE,EQ}_EXPR
+ and LTGT_EXPR to pp_expression.
+
2008-03-26 Douglas Gregor <doug.gregor@gmail.com>
* pt.c (coerce_template_template_parm): Moved the body of the loop
case CONJ_EXPR:
case VECTOR_CST:
case FIXED_CST:
+ case UNORDERED_EXPR:
+ case ORDERED_EXPR:
+ case UNLT_EXPR:
+ case UNLE_EXPR:
+ case UNGT_EXPR:
+ case UNGE_EXPR:
+ case UNEQ_EXPR:
+ case LTGT_EXPR:
pp_expression (cxx_pp, t);
break;
+2008-03-26 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/35332
+ * g++.dg/other/error27.C: New test.
+
2008-03-26 Richard Guenther <rguenther@suse.de>
* gcc.dg/fold-addr-1.c: New testcase.
--- /dev/null
+// PR c++/35332
+// { dg-do compile }
+
+void foo (double x, double y)
+{
+ __builtin_isgreater(x, y)(); // { dg-error "__builtin_\[^\n\]*cannot be used as a function" }
+ __builtin_isless(x, y)(); // { dg-error "__builtin_\[^\n\]*cannot be used as a function" }
+ __builtin_isgreaterequal(x, y)(); // { dg-error "__builtin_\[^\n\]*cannot be used as a function" }
+ __builtin_islessequal(x, y)(); // { dg-error "__builtin_\[^\n\]*cannot be used as a function" }
+ __builtin_isunordered(x, y)(); // { dg-error "__builtin_\[^\n\]*cannot be used as a function" }
+ __builtin_islessgreater(x, y)(); // { dg-error "__builtin_\[^\n\]*cannot be used as a function" }
+}