Bug 24645 – Hidden static assert error messages if more than 20 errors
Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2024-07-02T20:38:50Z
Last change time
2024-07-12T12:04:34Z
Keywords
pull
Assigned to
No Owner
Creator
feklushkin.denis
Comments
Comment #0 by feklushkin.denis — 2024-07-02T20:38:50Z
Imports are processed by frontend before static asserts. As result, for simple example (two lines of code only):
static assert(false, "some assertion failed");
import core.stdc.stdatomic;
user during compilation isn't sees any static assert error messages:
> ldc2 --mtriple=riscv32-unknown-newlib-elf -c assertion_test_main.d
/home/denizzz/ldc2_standalone/bin/../import/core/stdc/stdio.d(31): Error: module `core.stdc.stdint` import `intptr_t` not found
/home/denizzz/ldc2_standalone/bin/../import/core/stdc/stdio.d(798): Error: module `core.sys.posix.sys.types` import `ssize_t` not found, did you mean alias `object.size_t`?
/home/denizzz/ldc2_standalone/bin/../import/core/stdc/stdio.d(802): Error: undefined identifier `c_long`
/home/denizzz/ldc2_standalone/bin/../import/core/stdc/stdio.d(2011): Error: module `core.stdc.stddef` import `wchar_t` not found
[~16 lines skipped]
With --verrors=0 option user able to see appropriate static assert line at the end of compiler output, but it's confusing because it's unexpected not obvious behaviour
Is it possible to move static errors messages higher?
First mentioned here: https://github.com/ldc-developers/ldc/issues/4690
Comment #1 by dlang-bot — 2024-07-12T10:57:58Z
@dkorpel created dlang/dmd pull request #16684 "Fix bugzilla 24645 - Hidden static assert error messages if more than…" fixing this issue:
- Fix bugzilla 24645 - Hidden static assert error messages if more than 20 errors
https://github.com/dlang/dmd/pull/16684
Comment #2 by dlang-bot — 2024-07-12T12:04:34Z
dlang/dmd pull request #16684 "Fix bugzilla 24645 - Hidden static assert error messages if more than…" was merged into master:
- 2ab5c4524e3bfe0804bc428c74c636d0596f2a1b by Dennis Korpel:
Fix bugzilla 24645 - Hidden static assert error messages if more than 20 errors
https://github.com/dlang/dmd/pull/16684