Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/g++.dg/cpp0x/nsdmi-union6.C @ 158:494b0b89df80 default tip
...
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 25 May 2020 18:13:55 +0900 |
parents | 1830386684a0 |
children |
line wrap: on
line source
// PR c++/58664 // { dg-do compile { target c++11 } } struct F; // { dg-message "forward declaration" } union U // { dg-message "not complete" } { U u[1] = { 0 }; // { dg-error "5:field .u. has incomplete type" } }; template<typename T> union UT // { dg-message "not complete" } { UT u[1] = { 0 }; // { dg-error "incomplete type" } }; template union UT<int>; union UF { F u[1] = { 0 }; // { dg-error "5:field .u. has incomplete type" } }; template<typename T> union UFT { F u[1] = { 0 }; // { dg-error "5:field .u. has incomplete type" } }; template union UFT<int>; struct S // { dg-message "not complete" } { S s[1] = { 0 }; // { dg-error "5:field .s. has incomplete type" } }; template<typename T> struct ST // { dg-message "not complete" } { ST s[1] = { 0 }; // { dg-error "incomplete type" } }; template class ST<int>; struct SF { F s[1] = { 0 }; // { dg-error "5:field .s. has incomplete type" } }; template<typename T> struct SFT { F s[1] = { 0 }; // { dg-error "5:field .s. has incomplete type" } }; template class SFT<int>;