aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp2a/constexpr-117775.C
blob: 59fc0d332b926c6f436c6fb32ee16cad53986815 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// PR c++/117775
// Check that we don't ICE and have sizeof(void)==1 under -Wno-pointer-arith
// { dg-do run { target c++20 } }
// { dg-additional-options "-Wno-pointer-arith" }

int main() {
  struct why :
    decltype( [](auto) {
		return sizeof(void);
	      })
  {} x;
  return 1 - x.operator()(0);
}