[Issue 24367] New: '-deps' causes compile errors when using '-betterC'
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Feb 2 22:43:44 UTC 2024
https://issues.dlang.org/show_bug.cgi?id=24367
Issue ID: 24367
Summary: '-deps' causes compile errors when using '-betterC'
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: enhancement
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: andy-hanson at protonmail.com
Given this simple file:
```
import core.memory : pureMalloc;
extern(C) int main() {
pureMalloc(1);
return 0;
}
```
If I compile with `dmd a.d -betterC`, compilation succeeds.
If I instead use `dmd a.d -betterC -deps=deps.txt`, it fails with:
```
/usr/include/dmd/druntime/import/core/exception.d(556): Error: cannot use
`throw` statements with -betterC
/usr/include/dmd/druntime/import/core/exception.d(574): Error: cannot use
`throw` statements with -betterC
/usr/include/dmd/druntime/import/core/exception.d(611): Error: cannot use
`throw` statements with -betterC
/usr/include/dmd/druntime/import/core/exception.d(630): Error: cannot use
`throw` statements with -betterC
/usr/include/dmd/druntime/import/core/exception.d(648): Error: cannot use
`throw` statements with -betterC
/usr/include/dmd/druntime/import/core/exception.d(667): Error: cannot use
`throw` statements with -betterC
/usr/include/dmd/druntime/import/core/exception.d(725): Error: cannot use
`throw` statements with -betterC
/usr/include/dmd/druntime/import/core/exception.d(741): Error: cannot use
`throw` statements with -betterC
/usr/include/dmd/druntime/import/core/exception.d(758): Error: cannot use
`throw` statements with -betterC
```
The description of '-deps' doesn't indicate anything about changing the
behavior of the compiler, just printing information about what was compiled.
--
More information about the Digitalmars-d-bugs
mailing list