[Bug c++/86477] New: failure binding reference to vector element
zhonghao at pku dot org.cn
gcc-bugzilla@gcc.gnu.org
Wed Jul 11 01:10:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86477
Bug ID: 86477
Summary: failure binding reference to vector element
Product: gcc
Version: 8.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: zhonghao at pku dot org.cn
Target Milestone: ---
The code is as follows:
typedef __attribute__((ext_vector_type(4))) int vi4;
const int &r = vi4(1).x;
g++ rejects it:
error: request for member 'x' in '1', which is of non-class type 'vi4' {aka
'int'}
const int &r = vi4(1).x;
clang++ accepts the code. It looks like well-formed, right?
More information about the Gcc-bugs
mailing list