What's the difference between `extern "C" /*...*/` and `extern "C" { /*...*/ }`
10:37 21 Nov 2025

What is the semantic difference between

extern "C" static void foo() {}

and

extern "C" { static void foo() {} }

?

Both GCC and Clang reject the first but accept the second. Aren't these supposed to be equivalent?

c++ language-lawyer linkage storage-class-specifier extern-c