[Issue 18206] New: Deprecate duplicated overloads in DRuntime
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Jan 8 01:01:29 UTC 2018
https://issues.dlang.org/show_bug.cgi?id=18206
Issue ID: 18206
Summary: Deprecate duplicated overloads in DRuntime
Product: D
Version: D2
Hardware: x86_64
OS: All
Status: NEW
Severity: normal
Priority: P1
Component: druntime
Assignee: nobody at puremagic.com
Reporter: greensunny12 at gmail.com
>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;
--
More information about the Digitalmars-d-bugs
mailing list