re PR c++/35332 (Broken diagnostics for builtins)
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
This commit is contained in:
parent
4990038def
commit
07874f1f63
|
@ -1,3 +1,9 @@
|
|||
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
|
||||
|
|
|
@ -2048,6 +2048,14 @@ dump_expr (tree t, int flags)
|
|||
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;
|
||||
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
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.
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
// 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" }
|
||||
}
|
Loading…
Reference in New Issue