[dmd-internals] [D-Programming-Language/dmd] 78706d: Fix genCmain code to remove ambiguity of `&main` e...

GitHub noreply at github.com
Mon Sep 9 15:57:25 PDT 2013


  Branch: refs/heads/master
  Home:   https://github.com/D-Programming-Language/dmd
  Commit: 78706db954a9d0395032e460d5b0e84692e6f6f4
      https://github.com/D-Programming-Language/dmd/commit/78706db954a9d0395032e460d5b0e84692e6f6f4
  Author: k-hara <k.hara.pg at gmail.com>
  Date:   2013-09-09 (Mon, 09 Sep 2013)

  Changed paths:
    M src/func.c
    M src/mars.c

  Log Message:
  -----------
  Fix genCmain code to remove ambiguity of `&main` expression

It was introduced by pull#2476, but the expression `&main` which is implicitly
inserted would conflict with two extern(C) and (D) "main" functions in
user module.

Instead, separate the entry-point code in the hidden module __entrypoint.d

Compiler will emit the generated C-main code in the same object file that
contains D-main code.


  Commit: cb1a3409946475dc4f0d2654b0e457ee4d81c4dd
      https://github.com/D-Programming-Language/dmd/commit/cb1a3409946475dc4f0d2654b0e457ee4d81c4dd
  Author: k-hara <k.hara.pg at gmail.com>
  Date:   2013-09-09 (Mon, 09 Sep 2013)

  Changed paths:
    M src/mars.c
    A test/compilable/testlibmain.d

  Log Message:
  -----------
  Fix compiler segfault with main function and -lib switch


  Commit: ce48a27484001f07f689aa033f3328358f239713
      https://github.com/D-Programming-Language/dmd/commit/ce48a27484001f07f689aa033f3328358f239713
  Author: Martin Nowak <code at dawg.eu>
  Date:   2013-09-09 (Mon, 09 Sep 2013)

  Changed paths:
    M src/func.c
    M src/mars.c
    A test/compilable/testlibmain.d

  Log Message:
  -----------
  Merge pull request #2540 from 9rnsr/fix_main

Fix genCmain code to remove ambiguity of `&main` expression


Compare: https://github.com/D-Programming-Language/dmd/compare/86f860b2fb8e...ce48a2748400


More information about the dmd-internals mailing list