☰
Debian Codegraph
@
15:15.3.rel1-2
15:15.3.rel1-1
/
/
gcc
/
testsuite
/
g++.dg
/
parse
/
offsetof8.C
☽
☼
gcc/testsuite/g++.dg/parse/offsetof8.C
code
plain
raw
1
// PR c++/35321
2
3
struct A
4
{
5
A operator[] (int);
6
};
7
8
struct B
9
{
10
A a;
11
};
12
13
void foo()
14
{
15
__builtin_offsetof(B, a[0]); /* { dg-error "cannot apply 'offsetof' when 'operator\\\[\\\]' is overloaded" } */
16
}