diff options
| author | mmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-05-02 18:04:18 +0000 |
|---|---|---|
| committer | mmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-05-02 18:04:18 +0000 |
| commit | db4f24e2e16dee1e27f8114e2966bf5af5dfe0ad (patch) | |
| tree | 2ce95d7eb645836e91c85fc664e62f305180d0d0 /gcc/cp/decl.c | |
| parent | 3a4dde99d5d5addd6933d438201b49e6c1131f65 (diff) | |
| download | ppe42-gcc-db4f24e2e16dee1e27f8114e2966bf5af5dfe0ad.tar.gz ppe42-gcc-db4f24e2e16dee1e27f8114e2966bf5af5dfe0ad.zip | |
* decl.c (compute_array_index_type): Don't try to do anything with
the indices when processing a template.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@41770 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/decl.c')
| -rw-r--r-- | gcc/cp/decl.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 308d62f66e8..0e8a44bc70c 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -9224,12 +9224,6 @@ compute_array_index_type (name, size) { tree itype; - /* The size might be the result of a cast. */ - STRIP_TYPE_NOPS (size); - - /* It might be a const variable or enumeration constant. */ - size = decl_constant_value (size); - /* If this involves a template parameter, it will be a constant at instantiation time, but we don't know what the value is yet. Even if no template parameters are involved, we may an expression @@ -9252,6 +9246,12 @@ compute_array_index_type (name, size) size, integer_one_node)); } + /* The size might be the result of a cast. */ + STRIP_TYPE_NOPS (size); + + /* It might be a const variable or enumeration constant. */ + size = decl_constant_value (size); + /* The array bound must be an integer type. */ if (TREE_CODE (TREE_TYPE (size)) != INTEGER_TYPE && TREE_CODE (TREE_TYPE (size)) != ENUMERAL_TYPE |

