https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91973
--- Comment #3 from joseph at codesourcery dot com <joseph at codesourcery dot com> --- Macro replacement for function-like macros is defined in C17 6.10.3. Note in paragraph 10 the words "the function-like macro name followed by a ( as the next preprocessing token". In your example foo ends up followed by ) not ( as the next preprocessing token.