https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113587
Bug ID: 113587 Summary: Compile error with #pragma (end)region Product: gcc Version: 13.2.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: liavonlida at gmail dot com Target Milestone: --- I tried GCC 13.1 and got a compile error with valid code. Mininal sample is: void f() { #pragma region Shape if (true) { } #pragma endregion Shape else if (true) { } } result is: <source>: In function 'void f()': <source>:9:25: error: 'else' without a previous 'if' 9 | else if (true) | ^~~~ It's fine with: GCC <= 12 and MSVC GCC 13 and later (trunk) fails on it.