Bug 24367 – '-deps' causes compile errors when using '-betterC'

Status
NEW
Severity
enhancement
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2024-02-02T22:43:44Z
Last change time
2024-12-13T19:33:00Z
Assigned to
No Owner
Creator
andy-hanson
Moved to GitHub: dmd#20392 →

Comments

Comment #0 by andy-hanson — 2024-02-02T22:43:44Z
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.
Comment #1 by robert.schadek — 2024-12-13T19:33:00Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/20392 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB