Debian Codegraph @

gcc/testsuite/g++.dg/cpp2a/constexpr-117775.C

raw
1 // PR c++/117775
2 // Check that we don't ICE and have sizeof(void)==1 under -Wno-pointer-arith
3 // { dg-do run { target c++20 } }
4 // { dg-additional-options "-Wno-pointer-arith" }
5
6 int main() {
7 struct why :
8 decltype( [](auto) {
9 return sizeof(void);
10 })
11 {} x;
12 return 1 - x.operator()(0);
13 }