diff options
Diffstat (limited to 'gcc/c-format.c')
-rw-r--r-- | gcc/c-format.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/c-format.c b/gcc/c-format.c index bb730f3acda..341eb59c7c2 100644 --- a/gcc/c-format.c +++ b/gcc/c-format.c @@ -2094,7 +2094,7 @@ check_format_types (format_wanted_type *types, const char *format_start, && i == 0 && (TYPE_READONLY (cur_type) || (cur_param != 0 - && (TREE_CODE_CLASS (TREE_CODE (cur_param)) == 'c' + && (CONSTANT_CLASS_P (cur_param) || (DECL_P (cur_param) && TREE_READONLY (cur_param)))))) warning ("writing into constant object (arg %d)", arg_num); |