https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106767
--- Comment #2 from Alexey Izbyshev <izbyshev at ispras dot ru> --- Old MSVC doesn't support _Pragma, and I can make newer one recognize _Pragma only by unquoting the string literal, so the first test case becomes: // Removed stringizing in _Pragma #define P(x) _Pragma(x) #define f() P(push_macro("f")) P(pop_macro("f")) f() f() Recursion is detected properly: > cl /E test.c Microsoft (R) C/C++ Optimizing Compiler Version 19.28.29910 for x64 Copyright (C) Microsoft Corporation. All rights reserved. test.c #line 1 "test.c" f() The second test case modified in the same way also works: Microsoft (R) C/C++ Optimizing Compiler Version 19.28.29910 for x64 Copyright (C) Microsoft Corporation. All rights reserved. add.c #line 1 "add.c" 1, ADD(0, 1, 1, 0)