re PR c/45079 (function names in error message (�c_maybe_const_expr� not supported by 'pp_c_expression'))
PR c/45079 * c-pretty-print.c (pp_c_expression): Handle C_MAYBE_CONST_EXPR. * gcc.dg/pr45079.c: New test. From-SVN: r162575
This commit is contained in:
parent
a78e242c07
commit
f551f80cd1
gcc
@ -1,3 +1,8 @@
|
||||
2010-07-27 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR c/45079
|
||||
* c-pretty-print.c (pp_c_expression): Handle C_MAYBE_CONST_EXPR.
|
||||
|
||||
2010-07-27 Joseph Myers <joseph@codesourcery.com>
|
||||
|
||||
* c-common.h (c_common_missing_argument): Remove.
|
||||
|
@ -2167,6 +2167,10 @@ pp_c_expression (c_pretty_printer *pp, tree e)
|
||||
pp_string (pp, "({...})");
|
||||
break;
|
||||
|
||||
case C_MAYBE_CONST_EXPR:
|
||||
pp_c_expression (pp, C_MAYBE_CONST_EXPR_EXPR (e));
|
||||
break;
|
||||
|
||||
default:
|
||||
pp_unsupported_tree (pp, e);
|
||||
break;
|
||||
|
@ -1,3 +1,8 @@
|
||||
2010-07-27 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR c/45079
|
||||
* gcc.dg/pr45079.c: New test.
|
||||
|
||||
2010-07-27 Ira Rosen <irar@il.ibm.com>
|
||||
|
||||
PR tree-optimization/44152
|
||||
|
10
gcc/testsuite/gcc.dg/pr45079.c
Normal file
10
gcc/testsuite/gcc.dg/pr45079.c
Normal file
@ -0,0 +1,10 @@
|
||||
/* PR c/45079 */
|
||||
/* { dg-do compile } */
|
||||
|
||||
void
|
||||
foo (const char *p, int cond, int a, int b)
|
||||
{
|
||||
p[cond ? a : b] = '\0'; /* { dg-error "assignment of read-only location" } */
|
||||
}
|
||||
|
||||
/* { dg-bogus "not supported by" "" { target *-*-* } 0 } */
|
Loading…
Reference in New Issue
Block a user