[Issue 23548] New: [REG 2.098] C sources files have precedent over D modules
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Dec 10 15:12:41 UTC 2022
https://issues.dlang.org/show_bug.cgi?id=23548
Issue ID: 23548
Summary: [REG 2.098] C sources files have precedent over D
modules
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: regression
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: ibuclaw at gdcproject.org
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
--
More information about the Digitalmars-d-bugs
mailing list