In C++98 `{ a }` for aggregates can only mean constructing by
each element rather than a copy. This adds the expected error
message for SVE vectors for C++98.
Pushed as obvious after a test for aarch64-linux-gnu.
gcc/testsuite/ChangeLog:
* g++.dg/ext/sve-sizeless-1.C: Add error message for line 164
for C++98 only.
* g++.dg/ext/sve-sizeless-2.C: Likewise.
Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com>
svint8_t init_sve_sc3 = sve_sc1;
svint8_t init_sve_sc4 = sve_sh1; // { dg-error {cannot convert 'svint16_t' to 'svint8_t'} }
svint8_t init_sve_sc5 = {};
- svint8_t init_sve_sc6 = { sve_sc1 };
+ svint8_t init_sve_sc6 = { sve_sc1 }; // { dg-error {cannot convert 'svint8_t' to 'signed char'} "" { target c++98_only } }
svint8_t init_sve_sc7 = { sve_sh1 }; // { dg-error {cannot convert 'svint16_t' to 'signed char'} }
svint32_t init_sve_vc1 = { 0, 1 };
svint32_t init_sve_vc2 = { 0, bar () };
svint8_t init_sve_sc3 = sve_sc1;
svint8_t init_sve_sc4 = sve_sh1; // { dg-error {cannot convert 'svint16_t' to 'svint8_t'} }
svint8_t init_sve_sc5 = {};
- svint8_t init_sve_sc6 = { sve_sc1 };
+ svint8_t init_sve_sc6 = { sve_sc1 }; // { dg-error {cannot convert 'svint8_t' to 'signed char'} "" { target c++98_only } }
svint8_t init_sve_sc7 = { sve_sh1 }; // { dg-error {cannot convert 'svint16_t' to 'signed char'} }
svint32_t init_sve_vc1 = { 0, 1 };
svint32_t init_sve_vc2 = { 0, bar () };