aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp23/consteval-if9.C
blob: 1c7db1ac906f14854ff3f2ebf091f4e2b60e46a5 (plain)
1
2
3
4
5
6
7
8
9
10
11
// { dg-do compile { target c++20 } }
// { dg-options "-w" }

constexpr void f(int i)
{
  switch (i)
    if consteval		// { dg-message "enters 'consteval if'" }
      {
      case 42:;			// { dg-error "jump to case label" }
      }
}