2018-11-07 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / g++.dg / other / offsetof3.C
blob779fc72670a77e876848203c27afa127b2fdb813
1 /* Verify that offsetof complains if given a non-standard-layout class.  */
2 /* Copyright (C) 2003 Free Software Foundation, Inc. */
3 /* Contributed by Matt Austern <austern@apple.com> 15 May 2003 */
5 struct X
7   int x, y;
8 protected:
9   int z;
12 typedef X* pX;
13 typedef __SIZE_TYPE__ size_t;
15 size_t yoff = __builtin_offsetof (X, y); /* { dg-message "35:non-standard-layout" } */