c++: mangling union{1} in template [PR104847]
authorJason Merrill <jason@redhat.com>
Sun, 27 Mar 2022 00:10:19 +0000 (20:10 -0400)
committerJason Merrill <jason@redhat.com>
Mon, 28 Mar 2022 13:35:58 +0000 (09:35 -0400)
commit71e1db540c01a13b01fae054c92878a79252b471
tree0e815254322a394d0b9745ec8f2e2704aab34aa6
parent07be8f8da4c6840a1fd6b2229b147e50cc6f03dc
c++: mangling union{1} in template [PR104847]

My implementation of union non-type template arguments in r11-2016 broke
braced casts of union type, because they are still in syntactic (undigested)
form.

PR c++/104847

gcc/cp/ChangeLog:

* mangle.cc (write_expression): Don't write a union designator when
undigested.

gcc/testsuite/ChangeLog:

* g++.dg/abi/mangle-union1.C: New test.
gcc/cp/mangle.cc
gcc/testsuite/g++.dg/abi/mangle-union1.C [new file with mode: 0644]