[Bug c++/70476] C++11: Function name declared in unnamed namespace extern "C" gets exernal linkage

2023-03-16 Thread mail at maciej dot szmigiero.name via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70476 --- Comment #16 from Maciej S. Szmigiero --- > If you rely on the standard guarantee that extern "C" and extern "C++" make > function types different, you probably get compilation errors. It's the other way around - functions in standard-compli

[Bug c++/70476] C++11: Function name declared in unnamed namespace extern "C" gets exernal linkage

2023-03-13 Thread mail at maciej dot szmigiero.name via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70476 --- Comment #14 from Maciej S. Szmigiero --- > This is not so useful in practice because most compilers don't make extern > "C" and extern "C++" differentiate function types (implying calling > conventions etc.). The standard allows different

[Bug c++/70476] C++11: Function name declared in unnamed namespace extern "C" gets exernal linkage

2023-03-11 Thread mail at maciej dot szmigiero.name via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70476 --- Comment #11 from Maciej S. Szmigiero --- (In reply to Andrew Pinski from comment #9) > Does these two functions the same name then? > ``` > namespace a { >extern "C" void f(void); > } > > namespace { > extern "C" void f(void) {} > } >

[Bug c++/70476] C++11: Function name declared in unnamed namespace extern "C" gets exernal linkage

2023-03-11 Thread mail at maciej dot szmigiero.name via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70476 Maciej S. Szmigiero changed: What|Removed |Added CC||mail at maciej dot szmigiero.name