c++: cast to array of unknown bound [PR93259]
commit6bcca5f642eb950a3cef024ea49a35e4792306f6
authorJason Merrill <jason@redhat.com>
Mon, 12 Sep 2022 18:14:24 +0000 (12 14:14 -0400)
committerJason Merrill <jason@redhat.com>
Mon, 12 Sep 2022 19:46:59 +0000 (12 15:46 -0400)
treeb3dd30c6c6ed9248c4b22d0a19a2711fa0c6e2a7
parent936efcac733fe49e5ea9e636403e5941f24ff1b3
c++: cast to array of unknown bound [PR93259]

We already know to treat a variable of array-of-unknown-bound type as
dependent, we should do the same for arr{}.

PR c++/93259

gcc/cp/ChangeLog:

* pt.cc (type_dependent_expression_p): Treat a compound
literal of array-of-unknown-bound type like a variable.

gcc/testsuite/ChangeLog:

* g++.dg/cpp0x/initlist-array17.C: New test.
gcc/cp/pt.cc
gcc/testsuite/g++.dg/cpp0x/initlist-array17.C [new file with mode: 0644]