Jump to page: 1 2
Thread overview
[Issue 11881] -betterC switch suffers from bit rot
Jan 13, 2015
Mike
Oct 07, 2016
Martin Nowak
Oct 07, 2016
Martin Nowak
Oct 07, 2016
Adam D. Ruppe
Jun 19, 2017
Walter Bright
Jun 26, 2017
Martin Nowak
Jun 26, 2017
Walter Bright
Jun 26, 2017
Gary Willoughby
January 13, 2015
https://issues.dlang.org/show_bug.cgi?id=11881

Mike <slavo5150@yahoo.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |slavo5150@yahoo.com

--- Comment #14 from Mike <slavo5150@yahoo.com> ---
(In reply to Johannes Pfau from comment #13)
> 
> I'd say we introduce a core/config.di file with this content:
> ------------------
> enum RUNTIME_SUPPORTS_RTTI = false;
> enum RUNTIME_SUPPORTS_UTF_FOREACH = false; /*forach(dchar x; "utf8")*/
> enum RUNTIME_SUPPORTS_GC = false
> ------------------
> 
> If core/config.di isn't found the compiler automatically assumes false for all flags, i.e. a minimal runtime.
> 

I like this approach, but I believe Issue 12270 would provide a similar benefit in a different way.  If TypeInfo were implemented in the runtime (or even in the user's own code) and exposed through a .di file, then the compiler could generate RTTI based on the implementation if finds. If the implementation it finds is not what the code using it expects, the user will get compiler or linker errors.  If no implementation is found, and not used, no code is generated.

I like that because it leverages the toolchain's intrinsic behavior.  No special treatment for TypeInfo (well, you might need some special treatment to support some of D's existing functionality).

--
October 07, 2016
https://issues.dlang.org/show_bug.cgi?id=11881

Martin Nowak <code@dawg.eu> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dev@nomad.so

--- Comment #15 from Martin Nowak <code@dawg.eu> ---
*** Issue 16547 has been marked as a duplicate of this issue. ***

--
October 07, 2016
https://issues.dlang.org/show_bug.cgi?id=11881

Martin Nowak <code@dawg.eu> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |code@dawg.eu
           Severity|normal                      |major

--- Comment #16 from Martin Nowak <code@dawg.eu> ---
Same problem also applies to the newly added DWARF EH mechanism (relying on
__dmd_personality_v0).
We should likely just disable EH w/ -betterC.

--
October 07, 2016
https://issues.dlang.org/show_bug.cgi?id=11881

--- Comment #17 from Adam D. Ruppe <destructionator@gmail.com> ---
> We should likely just disable EH w/ -betterC.

Walter recently committed something to the compiler which keeps it from outputting that if you don't actually use it... I *think* the problem is solved already in the git head. I'm not completely sure though,  I haven't actually used it.

But I argue that's the ideal solution regardless: if you don't use EH, don't output the ref. If you do, output it and let the user deal with the linker error.

--
June 19, 2017
https://issues.dlang.org/show_bug.cgi?id=11881

Walter Bright <bugzilla@digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |betterC

--
June 26, 2017
https://issues.dlang.org/show_bug.cgi?id=11881

--- Comment #18 from Martin Nowak <code@dawg.eu> ---
Use `extern(C) int main` to avoid the _d_run_main dependency of the generated C
main wrapper.

--
June 26, 2017
https://issues.dlang.org/show_bug.cgi?id=11881

--- Comment #19 from Walter Bright <bugzilla@digitalmars.com> ---
(In reply to Martin Nowak from comment #18)
> Use `extern(C) int main` to avoid the _d_run_main dependency of the
> generated C main wrapper.

That's right. If you're writing C code, it's better to use the C main()!

Whether the compiler should complain about a D main() in a -betterC compile is
another matter. I'd prefer to defer such issues (and there are several) until
we gain some experience in the field with it.

--
June 26, 2017
https://issues.dlang.org/show_bug.cgi?id=11881

Gary Willoughby <dev@nomad.so> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|dev@nomad.so                |

--
June 26, 2017
https://issues.dlang.org/show_bug.cgi?id=11881

--- Comment #20 from github-bugzilla@puremagic.com ---
Commit pushed to master at https://github.com/dlang/dmd

https://github.com/dlang/dmd/commit/85873d9978028a7978121b25a00f6eed66f4f647 -betterC programs should not link in Phobos by default

- fixes Issue 11881, and 17521

--
June 26, 2017
https://issues.dlang.org/show_bug.cgi?id=11881

github-bugzilla@puremagic.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--
« First   ‹ Prev
1 2