===================================================================
@@ -1551,6 +1551,14 @@
: "__builtin_islessgreater");
goto two_args_fun;
+ case MAX_EXPR:
+ pp_c_ws_string (this, "max");
+ goto two_args_fun;
+
+ case MIN_EXPR:
+ pp_c_ws_string (this, "min");
+ goto two_args_fun;
+
two_args_fun:
pp_c_left_paren (this);
expression (TREE_OPERAND (e, 0));
@@ -1829,6 +1837,8 @@
case MULT_EXPR:
case TRUNC_DIV_EXPR:
case TRUNC_MOD_EXPR:
+ case EXACT_DIV_EXPR:
+ case RDIV_EXPR:
multiplicative_expression (TREE_OPERAND (e, 0));
pp_c_whitespace (this);
if (code == MULT_EXPR)
@@ -1890,9 +1900,12 @@
{
case LSHIFT_EXPR:
case RSHIFT_EXPR:
+ case LROTATE_EXPR:
+ case RROTATE_EXPR:
pp_c_shift_expression (pp, TREE_OPERAND (e, 0));
pp_c_whitespace (pp);
- pp_string (pp, code == LSHIFT_EXPR ? "<<" : ">>");
+ pp_string (pp,
+ code == LSHIFT_EXPR || code == LROTATE_EXPR ? "<<" : ">>");
pp_c_whitespace (pp);
pp_c_additive_expression (pp, TREE_OPERAND (e, 1));
break;
@@ -2186,6 +2199,8 @@
case UNLT_EXPR:
case UNGE_EXPR:
case UNGT_EXPR:
+ case MAX_EXPR:
+ case MIN_EXPR:
case ABS_EXPR:
case CONSTRUCTOR:
case COMPOUND_LITERAL_EXPR:
@@ -2217,11 +2232,15 @@
case MULT_EXPR:
case TRUNC_MOD_EXPR:
case TRUNC_DIV_EXPR:
+ case EXACT_DIV_EXPR:
+ case RDIV_EXPR:
multiplicative_expression (e);
break;
case LSHIFT_EXPR:
case RSHIFT_EXPR:
+ case LROTATE_EXPR:
+ case RROTATE_EXPR:
pp_c_shift_expression (this, e);
break;
2017-03-09 Volker Reichelt <v.reichelt@netcologne.de>
PR c/35441
* gcc.dg/pr35441.c: New test.
===================================================================
@@ -0,0 +1,26 @@
+/* PR c/35441 */
+/* { dg-do compile } */
+/* { dg-options "-fno-diagnostics-show-caret" } */
+/* { dg-bogus "not supported by" "" { target *-*-* } 0 } */
+
+void foo1(char **p, char **q)
+{
+ (p - q)(); /* { dg-error "is not a function" } */
+}
+
+void foo2(double x, double y)
+{
+ (x/y)(); /* { dg-error "is not a function" } */
+}
+
+void foo3(unsigned i, int j)
+{
+ (i << j | i >> (32 - j))(); /* { dg-error "is not a function" } */
+ (i >> j | i << (32 - j))(); /* { dg-error "is not a function" } */
+}
+
+void foo4(char *p, char *q)
+{
+ (p < q ? p : q)(); /* { dg-error "is not a function" } */
+ (p > q ? p : q)(); /* { dg-error "is not a function" } */
+}