[Issue 23547] New: [REG master] C header files have precedent over D modules
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Dec 10 14:45:53 UTC 2022
https://issues.dlang.org/show_bug.cgi?id=23547
Issue ID: 23547
Summary: [REG master] C header 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
This test fails.
$ 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.h
```
#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 */
```
--
More information about the Digitalmars-d-bugs
mailing list