Open denizzzka opened 4 years ago
C header:
unsigned int val; #define MMIO32(addr) (*(volatile unsigned int *)(addr)) #define VOL_VAL MMIO32(&val)
dpp code what uses this macros:
VOL_VAL |= 1;
Produced D code:
( * ( volatile uint32_t * ) ( & val ) ) |= 1; // contains non-D "volatile" keyword
Compilation error:
test.d(11657): Error: found uint32_t when expecting ) test.d(11657): Error: expression expected, not )
C header:
dpp code what uses this macros:
Produced D code:
Compilation error: