Thread overview
[Issue 23622] ImportC #defines conflict with declarations
[Issue 23622] ImportC fails to compile files which include math.h
Jan 13, 2023
Walter Bright
Jan 13, 2023
Walter Bright
Jan 13, 2023
Walter Bright
Jan 13, 2023
Dlang Bot
Jan 14, 2023
Dlang Bot
Jan 14, 2023
Lance Bachmeier
January 13, 2023
https://issues.dlang.org/show_bug.cgi?id=23622

Walter Bright <bugzilla@digitalmars.com> changed:

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

--- Comment #1 from Walter Bright <bugzilla@digitalmars.com> ---
What's happening is ImportC sees those macro definitions and transforms them into manifest constant declarations. Those declarations then conflict with the enum declarations.

--
January 13, 2023
https://issues.dlang.org/show_bug.cgi?id=23622

--- Comment #2 from Walter Bright <bugzilla@digitalmars.com> ---
A reduced test case:

  enum {  FP_NAN = 0 };
  #define FP_NAN 0

--
January 13, 2023
https://issues.dlang.org/show_bug.cgi?id=23622

Walter Bright <bugzilla@digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|ImportC fails to compile    |ImportC #defines conflict
                   |files which include math.h  |with declarations

--
January 13, 2023
https://issues.dlang.org/show_bug.cgi?id=23622

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

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

--- Comment #3 from Dlang Bot <dlang-bot@dlang.rocks> ---
@WalterBright created dlang/dmd pull request #14811 "fix Issue 23622 - ImportC #defines conflict with declarations" fixing this issue:

- fix Issue 23622 - ImportC #defines conflict with declarations

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

--
January 14, 2023
https://issues.dlang.org/show_bug.cgi?id=23622

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

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

--- Comment #4 from Dlang Bot <dlang-bot@dlang.rocks> ---
dlang/dmd pull request #14811 "fix Issue 23622 - ImportC #defines conflict with declarations" was merged into master:

- 6ad91b95ce902a86199b234117b58bc48d14710a by Walter Bright:
  fix Issue 23622 - ImportC #defines conflict with declarations

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

--
January 14, 2023
https://issues.dlang.org/show_bug.cgi?id=23622

Lance Bachmeier <lance@lancebachmeier.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |lance@lancebachmeier.com

--