+2017-05-09 Volker Reichelt <v.reichelt@netcologne.de>
+
+ PR c/35441
+ * c-pretty-print.c (c_pretty_printer::expression): Handle MAX_EXPR,
+ MIN_EXPR, EXACT_DIV_EXPR, RDIV_EXPR, LROTATE_EXPR, RROTATE_EXPR.
+ (c_pretty_printer::postfix_expression): Handle MAX_EXPR, MIN_EXPR.
+ (c_pretty_printer::multiplicative_expression): Handle EXACT_DIV_EXPR,
+ RDIV_EXPR.
+ (pp_c_shift_expression): Handle LROTATE_EXPR, RROTATE_EXPR.
+
2017-05-09 Marek Polacek <polacek@redhat.com>
PR c/80525
: "__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));
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)
{
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 == RSHIFT_EXPR ? ">>" :
+ code == LROTATE_EXPR ? "<<<" : ">>>");
pp_c_whitespace (pp);
pp_c_additive_expression (pp, TREE_OPERAND (e, 1));
break;
case UNLT_EXPR:
case UNGE_EXPR:
case UNGT_EXPR:
+ case MAX_EXPR:
+ case MIN_EXPR:
case ABS_EXPR:
case CONSTRUCTOR:
case COMPOUND_LITERAL_EXPR:
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-05-09 Volker Reichelt <v.reichelt@netcologne.de>
+
+ PR c/35441
+ * gcc.dg/pr35441.c: New test.
+
2017-05-09 Martin Sebor <msebor@redhat.com>
PR testsuite/80643
--- /dev/null
+/* 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" } */
+}