2013-04-30 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / g++.dg / parse / offsetof8.C
blobe613ddcbb9af5062ab93fc2177bc0383b6bd28c5
1 // PR c++/35321
3 struct A
5   A operator[] (int);
6 };
8 struct B
10   A a;
13 void foo()
15   __builtin_offsetof(B, a[0]); /* { dg-error "cannot apply 'offsetof' when 'operator\\\[\\\]' is overloaded" } */