Same as issue 23547, but this affects incidental C sources in the build tree.
$ dmd -I=imports importd.d
importd.d(2): Error: undefined identifier `Have_Qsort_R`
importd.d(2): while evaluating: `static assert(Have_Qsort_R)`
importd.d
```
import gcc.config;
static assert(Have_Qsort_R);
```
imports/gcc/config.d
```
module gcc.config;
enum Have_Qsort_R = true;
```
gcc/config.c
```
#ifndef GCC_CONFIG_H
#define GCC_CONFIG_H
#ifdef GENERATOR_FILE
#error config.h is for the host, not build, machine.
#endif
#ifdef IN_GCC
# include "ansidecl.h"
#endif
#endif /* GCC_CONFIG_H */
```
Introduced by https://github.com/dlang/dmd/pull/12507
Comment #1 by dlang-bot — 2022-12-12T13:53:50Z
@ibuclaw created dlang/dmd pull request #14687 "fix Issue 23548 - [REG 2.098] C sources files have precedent over D modules in imports" fixing this issue:
- fix Issue 23548 - [REG 2.098] C sources files have precedent over D modules in imports
https://github.com/dlang/dmd/pull/14687
Comment #2 by dlang-bot — 2022-12-12T15:05:24Z
dlang/dmd pull request #14687 "fix Issue 23548 - [REG 2.098] C sources files have precedent over D modules in imports" was merged into stable:
- a053bb8d3bdeb8e887ce428708b13d21ebda215a by Iain Buclaw:
fix Issue 23548 - [REG 2.098] C sources files have precedent over D modules in imports
https://github.com/dlang/dmd/pull/14687
Comment #3 by dlang-bot — 2022-12-15T13:56:59Z
dlang/dmd pull request #14692 "Revert "fix Issue 23548 - [REG 2.098] C sources files have precedent over D modules in imports"" was merged into stable:
- bb748e396725191e7b44f6dda41901028aeb4703 by Walter Bright:
Revert "fix Issue 23548 - [REG 2.098] C sources files have precedent over D modules in imports"
This reverts commit bc3280bef9aeac70c2bebf64c5f316e0dcec409a.
https://github.com/dlang/dmd/pull/14692
Comment #4 by dlang-bot — 2022-12-15T15:49:07Z
dlang/dmd pull request #14700 "fix Issue 23548 - [REG 2.098] C sources files have precedent over D modules in imports" was merged into master:
- bca0b32314c87100307a66129a0d8349e892de52 by Iain Buclaw:
fix Issue 23548 - [REG 2.098] C sources files have precedent over D modules in imports
https://github.com/dlang/dmd/pull/14700
Comment #5 by dlang-bot — 2022-12-15T18:56:29Z
@ibuclaw created dlang/dmd pull request #14701 "merge stable" fixing this issue:
- fix Issue 23548 - [REG 2.098] C sources files have precedent over D modules in imports
- Revert "fix Issue 23548 - [REG 2.098] C sources files have precedent over D modules in imports"
This reverts commit bc3280bef9aeac70c2bebf64c5f316e0dcec409a.
https://github.com/dlang/dmd/pull/14701
Comment #6 by dlang-bot — 2022-12-15T22:50:07Z
dlang/dmd pull request #14701 "merge stable" was merged into master:
- bc3280bef9aeac70c2bebf64c5f316e0dcec409a by Iain Buclaw:
fix Issue 23548 - [REG 2.098] C sources files have precedent over D modules in imports
- f36d41bfd5bd98f8c6b4e399583ed685d779ebed by Walter Bright:
Revert "fix Issue 23548 - [REG 2.098] C sources files have precedent over D modules in imports"
This reverts commit bc3280bef9aeac70c2bebf64c5f316e0dcec409a.
https://github.com/dlang/dmd/pull/14701
Comment #7 by ibuclaw — 2022-12-30T23:38:56Z
*** This issue has been marked as a duplicate of issue 23547 ***