aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/pr85039-1.C
blob: 2bda81ba8394c4c4a00989ac2f7bc2e4ce3e649f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// { dg-do compile { target c++14 } }

constexpr int a() {
 return
  __builtin_offsetof(struct { // { dg-error "types may not be defined" }
    int i;
    short b {
      __builtin_offsetof(struct {
	int j;
        struct c {
          void d() {
          }
        };
      }, j)
    };
  }, i);
}