>- In stmt.decl-after-label, C23 will additionally allow a label at the end of a block. C++ does not. So they will still not match after C23 :). You need to put a null statement (a semicolon) after a label at the end of a block to make it portable.
This actually isn't true, there is a small change to the standard that has been approved for C++23 to keep the grammars in sync on this. See here: https://github.com/steve-downey/papers/blob/master/wg21-stat...