From https://github.com/dlang/dmd/pull/7577
DRuntime uses quite a bit of similar overloads of equal, bodyless function.
If the workaround in https://github.com/dlang/dmd/pull/7577 is disabled, it errors with:
src/core/sys/posix/signal.d(1720): Error: function core.sys.posix.signal.bsd_signal (int sig, extern (C) void function(int) nothrow @nogc func) cannot be overloaded with another extern (C) function at src/core/sys/posix/signal.d(1715)
src/core/sys/posix/signal.d(1721): Error: function core.sys.posix.signal.sigset (int sig, extern (C) void function(int) nothrow @nogc func) cannot be overloaded with another extern (C) function at src/core/sys/posix/signal.d(1716)
src/core/sys/posix/pthread.d(351): Error: function core.sys.posix.pthread.pthread_atfork (extern (C) void function() @nogc, extern (C) void function() @nogc, extern (C) void function() @nogc) cannot be overloaded with another extern (C) function at src/core/sys/posix/pthread.d(349)
src/core/sys/posix/pthread.d(374): Error: function core.sys.posix.pthread._pthread_cleanup_push (_pthread_cleanup_buffer*, extern (C) void function(void*) nothrow @nogc, void*) cannot be overloaded with another extern (C) function at src/core/sys/posix/pthread.d(373)
src/core/sys/posix/pthread.d(563): Error: function core.sys.posix.pthread.pthread_mutex_lock (shared(pthread_mutex_t)*) cannot be overloaded with another extern (C) function at src/core/sys/posix/pthread.d(562)
src/core/sys/posix/pthread.d(565): Error: function core.sys.posix.pthread.pthread_mutex_trylock (shared(pthread_mutex_t)*) cannot be overloaded with another extern (C) function at src/core/sys/posix/pthread.d(564)
src/core/sys/posix/pthread.d(567): Error: function core.sys.posix.pthread.pthread_mutex_unlock (shared(pthread_mutex_t)*) cannot be overloaded with another extern (C) function at src/core/sys/posix/pthread.d(566)
An example:
int pthread_mutex_lock(pthread_mutex_t*);
int pthread_mutex_lock(shared(pthread_mutex_t)*);
Another:
void _pthread_cleanup_push(_pthread_cleanup_buffer*, _pthread_cleanup_routine, void*);
void _pthread_cleanup_push(_pthread_cleanup_buffer*, _pthread_cleanup_routine_nogc, void*) @nogc;
Comment #1 by robert.schadek — 2024-12-07T13:37:55Z