Thread overview
[Issue 24200] ImportC: .di file collected macro conflicts with Special Token
Oct 27, 2023
Walter Bright
Nov 06, 2023
Walter Bright
Nov 11, 2023
Dlang Bot
Nov 22, 2023
Dlang Bot
October 27, 2023
https://issues.dlang.org/show_bug.cgi?id=24200

Walter Bright <bugzilla@digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bugzilla@digitalmars.com

--- Comment #1 from Walter Bright <bugzilla@digitalmars.com> ---
I don't really know what to do about that. D has a different set of keywords than C does, and if D keywords are used in C code, how can it be translated into D code?

I expect that such generated .di files will need to be tweaked by hand.

--
October 27, 2023
https://issues.dlang.org/show_bug.cgi?id=24200

--- Comment #2 from dave287091@gmail.com ---
(In reply to Walter Bright from comment #1)
> I don't really know what to do about that. D has a different set of keywords than C does, and if D keywords are used in C code, how can it be translated into D code?
> 
> I expect that such generated .di files will need to be tweaked by hand.

I think it’d be acceptable to just not emit them into the .di file. The __VERSION__ one especially as clang pre-defines that one and no one will want to use them. No one will want the conflicting macros anyway, but they currently prevent the .di file from being parsed.

--
November 06, 2023
https://issues.dlang.org/show_bug.cgi?id=24200

--- Comment #3 from Walter Bright <bugzilla@digitalmars.com> ---
(In reply to dave287091 from comment #2)
> I think it’d be acceptable to just not emit them into the .di file. The __VERSION__ one especially as clang pre-defines that one and no one will want to use them. No one will want the conflicting macros anyway, but they currently prevent the .di file from being parsed.

I'm a bit reluctant to do that - silently removing things that don't work. The user should be aware of what is not working so they can make appropriate changes.

I'll think about it some more.

--
November 11, 2023
https://issues.dlang.org/show_bug.cgi?id=24200

Dlang Bot <dlang-bot@dlang.rocks> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull

--- Comment #4 from Dlang Bot <dlang-bot@dlang.rocks> ---
@WalterBright created dlang/dmd pull request #15797 "fix Issue 24200 - ImportC: .di file collected macro conflicts with Sp…" fixing this issue:

- fix Issue 24200 - ImportC: .di file collected macro conflicts with Special Token

https://github.com/dlang/dmd/pull/15797

--
November 22, 2023
https://issues.dlang.org/show_bug.cgi?id=24200

Dlang Bot <dlang-bot@dlang.rocks> changed:

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

--- Comment #5 from Dlang Bot <dlang-bot@dlang.rocks> ---
dlang/dmd pull request #15797 "fix Issue 24200 - ImportC: .di file collected macro conflicts with Sp…" was merged into master:

- db28d2195c13cb661b266d93d70a1337d562cb17 by Walter Bright:
  fix Issue 24200 - ImportC: .di file collected macro conflicts with Special
Token

https://github.com/dlang/dmd/pull/15797

--