diff options
author | Jason Merrill <jason@redhat.com> | 2002-04-24 20:13:45 -0400 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2002-04-24 20:13:45 -0400 |
commit | a49cfba81bf9021a62ca111e7f7baea84213a19a (patch) | |
tree | df80a5e6a3e2b9311e58c1832f38a21203278e85 /gcc/cp/tree.c | |
parent | fcae219ac449243231ebbe73eefddde824d7354b (diff) | |
download | gcc-a49cfba81bf9021a62ca111e7f7baea84213a19a.zip gcc-a49cfba81bf9021a62ca111e7f7baea84213a19a.tar.gz gcc-a49cfba81bf9021a62ca111e7f7baea84213a19a.tar.bz2 |
typeck.c (build_modify_expr): The pedwarn for array assignment is now unconditional.
* typeck.c (build_modify_expr): The pedwarn for array assignment is
now unconditional.
* tree.c (build_cplus_array_type_1): Still process simple array types
normally in templates.
From-SVN: r52746
Diffstat (limited to 'gcc/cp/tree.c')
-rw-r--r-- | gcc/cp/tree.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c index ff3e633..cdf9d75 100644 --- a/gcc/cp/tree.c +++ b/gcc/cp/tree.c @@ -463,7 +463,12 @@ build_cplus_array_type_1 (elt_type, index_type) if (elt_type == error_mark_node || index_type == error_mark_node) return error_mark_node; - if (processing_template_decl + /* Don't do the minimal thing just because processing_template_decl is + set; we want to give string constants the right type immediately, so + we don't have to fix them up at instantiation time. */ + if ((processing_template_decl + && index_type && TYPE_MAX_VALUE (index_type) + && TREE_CODE (TYPE_MAX_VALUE (index_type)) != INTEGER_CST) || uses_template_parms (elt_type) || uses_template_parms (index_type)) { |