steplong added a comment. Hmm, it looks like MSVC is accepting:
extern "C" { static void foo(); } static int foo(); #pragma alloc_text("s", foo) static void foo() {} Ignoring the `pragma alloc_text`, it looks like GCC compiles the following `foo` with C linkage vs LLVM which compiles with C++ linkage (foo's name is mangled): extern "C" { static int foo(); } static int foo(); static int foo() { return 3; } int bar() { return foo(); } Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126559/new/ https://reviews.llvm.org/D126559 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits