diff options
author | Jason Merrill <jason@redhat.com> | 2024-02-01 16:54:39 -0500 |
---|---|---|
committer | Jason Merrill <jason@redhat.com> | 2024-02-01 22:21:02 -0500 |
commit | 0b786ff38ab398087820d91241e030a28c451df9 (patch) | |
tree | ac3c59058e730f4a2719e30fddd80e881d97aef2 /gcc/cp/cp-tree.h | |
parent | e0701f8f7b6dcddb299eb5345e510cf9ea419150 (diff) | |
download | gcc-0b786ff38ab398087820d91241e030a28c451df9.zip gcc-0b786ff38ab398087820d91241e030a28c451df9.tar.gz gcc-0b786ff38ab398087820d91241e030a28c451df9.tar.bz2 |
c++: variable template array of unknown bound [PR113638]
When we added variable templates, we didn't extend the VAR_HAD_UNKNOWN_BOUND
handling for class template static data members to handle them as well.
PR c++/113638
gcc/cp/ChangeLog:
* cp-tree.h: Adjust comment.
* pt.cc (instantiate_template): Set VAR_HAD_UNKNOWN_BOUND for
variable template.
gcc/testsuite/ChangeLog:
* g++.dg/cpp1y/var-templ-array1.C: New test.
Diffstat (limited to 'gcc/cp/cp-tree.h')
-rw-r--r-- | gcc/cp/cp-tree.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h index f46b448..969c723 100644 --- a/gcc/cp/cp-tree.h +++ b/gcc/cp/cp-tree.h @@ -3251,7 +3251,7 @@ struct GTY(()) lang_decl { #define DECL_CONV_FN_TYPE(FN) \ TREE_TYPE ((gcc_checking_assert (DECL_CONV_FN_P (FN)), DECL_NAME (FN))) -/* Nonzero if NODE, a static data member, was declared in its class as an +/* Nonzero if NODE, a templated variable, was declared as an array of unknown bound. */ #define VAR_HAD_UNKNOWN_BOUND(NODE) \ (DECL_LANG_SPECIFIC (VAR_DECL_CHECK (NODE)) \ |