[Issue 18393] REG(v2.078.1=>master) function re-declarations causes conflict, but should not
https://issues.dlang.org/show_bug.cgi?id=18393 Walter Bright changed: What|Removed |Added Status|REOPENED|RESOLVED CC||bugzi...@digitalmars.com Resolution|--- |INVALID --- Comment #8 from Walter Bright --- I can't reproduce the problem. --
[Issue 18393] REG(v2.078.1=>master) function re-declarations causes conflict, but should not
https://issues.dlang.org/show_bug.cgi?id=18393 RazvanN changed: What|Removed |Added CC||razvan.nitu1...@gmail.com --- Comment #7 from RazvanN --- I cannot reproduce the original bug example. Is this still valid? If not please close it. --
[Issue 18393] REG(v2.078.1=>master) function re-declarations causes conflict, but should not
https://issues.dlang.org/show_bug.cgi?id=18393 Sebchanged: What|Removed |Added Status|RESOLVED|REOPENED Resolution|WONTFIX |--- --- Comment #6 from Seb --- Sorry about eagerly closing this. It seems that the following use shouldn't trigger the error. Multiple declaration of the same type if they both have no body. --
[Issue 18393] REG(v2.078.1=>master) function re-declarations causes conflict, but should not
https://issues.dlang.org/show_bug.cgi?id=18393 --- Comment #5 from Timothee Cour--- probably related to this PR: https://github.com/dlang/dmd/pull/7577/files#diff-3084a264389e086215b36670ae9f4a3dR392 snippet: /* Allow the hack that is actually used in druntime, + * to ignore function attributes for extern (C) functions. + * TODO: Must be reconsidered in the future. + * BUG: https://issues.dlang.org/show_bug.cgi?id=18206 + * + * extern(C): + * alias sigfn_t = void function(int); + * alias sigfn_t2 = void function(int) nothrow @nogc; + * sigfn_t bsd_signal(int sig, sigfn_t func); + * sigfn_t2 bsd_signal(int sig, sigfn_t2 func) nothrow @nogc; // no error + */ why would extern(C) be allowed to redeclare but not extern(C++)? from looking at druntime it shows: ``` extern(C): sigfn_t bsd_signal(int sig, sigfn_t func); sigfn_t2 bsd_signal(int sig, sigfn_t2 func); ``` indeed, `bsd_signal` is being redeclared... not sure i understand the details of why that’s needed but I don’t understand why extern(C++) would differ from extern(C) --
[Issue 18393] REG(v2.078.1=>master) function re-declarations causes conflict, but should not
https://issues.dlang.org/show_bug.cgi?id=18393 --- Comment #4 from Timothee Cour--- I'm confused: https://github.com/dlang/dmd/pull/7577/files says: Issue 14147 - Compiler crash on identical functions in a single module the bugs this fixes are cases of multiply defined functions, not multiply declared functions: in your eg in https://github.com/dlang/dmd/pull/7577/files: the bug i'm reporting below is multiply declared functions: ``` void fun(); void fun(); ``` why would this be OK: ``` void f1(); void f1() {} ``` but not this: ``` void f1(); void f1(); void f1() {} ``` ? --
[Issue 18393] REG(v2.078.1=>master) function re-declarations causes conflict, but should not
https://issues.dlang.org/show_bug.cgi?id=18393 Sebchanged: What|Removed |Added Status|NEW |RESOLVED CC||greensunn...@gmail.com Resolution|--- |WONTFIX --- Comment #3 from Seb --- It's not a bug, it's a feature - https://github.com/dlang/dmd/pull/7577 A lot better than the segfaults or silent errors you got before. DMD never supported this. I just didn't complain loudly to you before. > on a vaguely related note: That's a different issue. Please open a new issue ;-) --
[Issue 18393] REG(v2.078.1=>master) function re-declarations causes conflict, but should not
https://issues.dlang.org/show_bug.cgi?id=18393 --- Comment #2 from Timothee Cour--- on a vaguely related note: ``` void fun_bad3(T)(T a); void fun_bad3(T)(T a){} void test(){ fun_bad3(1); } ``` Error: test_all.fun_bad3 called with argument types (int) matches both: main.d(11): test_all.fun_bad3!int.fun_bad3(int a) and: main.d(12): test_all.fun_bad3!int.fun_bad3(int a) is that intended that only functions can be pre-declared, but not function templates? --
[Issue 18393] REG(v2.078.1=>master) function re-declarations causes conflict, but should not
https://issues.dlang.org/show_bug.cgi?id=18393 Timothee Courchanged: What|Removed |Added CC||timothee.co...@gmail.com --- Comment #1 from Timothee Cour --- NOTE: it's in git master(git rev-parse HEAD 7e8bea0e83314f39b8c8b2bddbfbff2b0bdee74d) not in 2.078.2 --