https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85487
--- Comment #6 from Jonathan Wakely <redi at gcc dot gnu.org> --- (In reply to Jakub Jelinek from comment #4) > Exactly. Seems clang doesn't bother with it and allows anything, but it is > unclear if that is the best thing to do. MSVC ignores any tokens after the region/endregion as well. > Is name and comment just a single identifier, or any sequence of any tokens > until end of line? > And, shall the compiler verify proper nestin of these, e.g. reject > #pragma endregion > without earlier #pragma region, or > #pragma region > without termination, or whenever they aren't properly nested? Again, other compilers don't care: https://godbolt.org/z/zxhYaaz9Y So it looks like this is completely ignored by the compiler, and any logic relating to it exists only in the editor(s).