diff options
author | Alexandre Oliva <oliva@dcc.unicamp.br> | 1999-08-06 20:44:44 +0000 |
---|---|---|
committer | Alexandre Oliva <oliva@gcc.gnu.org> | 1999-08-06 20:44:44 +0000 |
commit | f05f680ac04280bdc08ecb82385a603a69866c93 (patch) | |
tree | 645fb4160b72b77bc327b2c0e33924b7a7c7e07f /gcc | |
parent | 7339705d94d4dff3231c143da318e9cf5f8a04ca (diff) | |
download | gcc-f05f680ac04280bdc08ecb82385a603a69866c93.zip gcc-f05f680ac04280bdc08ecb82385a603a69866c93.tar.gz gcc-f05f680ac04280bdc08ecb82385a603a69866c93.tar.bz2 |
pt.c (tsubst): Use build_index_type to build in-template array index type.
* pt.c (tsubst): Use build_index_type to build in-template array
index type. Fixes g++.oliva/dwarf1.C.
* decl.c (grokdeclarator): Likewise, just for consistency, as it
doesn't seem to trigger the bug without it.
From-SVN: r28556
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/cp/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/cp/decl.c | 6 | ||||
-rw-r--r-- | gcc/cp/pt.c | 7 |
3 files changed, 11 insertions, 9 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 88180be..c861db667 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,10 @@ +1999-08-06 Alexandre Oliva <oliva@dcc.unicamp.br> + + * pt.c (tsubst): Use build_index_type to build in-template array + index type. Fixes g++.oliva/dwarf1.C. + * decl.c (grokdeclarator): Likewise, just for consistency, as it + doesn't seem to trigger the bug without it. + 1999-08-06 Jason Merrill <jason@yorick.cygnus.com> * typeck2.c (add_exception_specifier): Use complete_type. diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 67b7108..93eb61f 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -10054,10 +10054,8 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist) size = t; } - itype = make_node (INTEGER_TYPE); - TYPE_MIN_VALUE (itype) = size_zero_node; - TYPE_MAX_VALUE (itype) = build_min - (MINUS_EXPR, sizetype, size, integer_one_node); + itype = build_index_type (build_min + (MINUS_EXPR, sizetype, size, integer_one_node)); goto dont_grok_size; } diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index b516cb9..357b1d1 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -6193,11 +6193,8 @@ tsubst (t, args, complain, in_decl) not PROCESSING_TEMPLATE_DECL. */ || TREE_CODE (max) != INTEGER_CST) { - tree itype = make_node (INTEGER_TYPE); - TYPE_MIN_VALUE (itype) = size_zero_node; - TYPE_MAX_VALUE (itype) = build_min (MINUS_EXPR, sizetype, max, - integer_one_node); - return itype; + return build_index_type (build_min + (MINUS_EXPR, sizetype, max, integer_one_node)); } if (integer_zerop (omax)) |