Bug 23037 – importC: type with only type-qualifier doesn't work

Status
RESOLVED
Resolution
FIXED
Severity
minor
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2022-04-19T13:19:45Z
Last change time
2022-05-05T21:04:14Z
Keywords
ImportC, pull
Assigned to
No Owner
Creator
duser

Comments

Comment #0 by duser — 2022-04-19T13:19:45Z
const a; // ignored, doesn't declare "a" const b = 1; // syntax error int c = sizeof(const); // segfault in src/dmd/expression.d:3397 int d = (const)0; // segfault in src/dmd/mtype.d:2710 int *e = (const*)0; // segfault in src/dmd/mtype.d:4050 enum E : const { ee=1, }; // assert in src/dmd/dsymbolsem.d:2164 depending on what C11 allows, these should be either rejected in the parser or made to default to "int" like in other compilers the line numbers are at dmd commit 41ca11ebf3cc9086906958ea448b69bf37dc36a0
Comment #1 by bugzilla — 2022-04-20T07:08:32Z
C11 6.7.2-4 says "At least one type specifier shall be given in the declaration specifiers in each declaration" I'll go with that.
Comment #2 by dlang-bot — 2022-04-21T08:00:48Z
@WalterBright created dlang/dmd pull request #14018 "fix Issue 23037 - importC: type with only type-qualifier doesn't work" fixing this issue: - fix Issue 23037 - importC: type with only type-qualifier doesn't work https://github.com/dlang/dmd/pull/14018
Comment #3 by dlang-bot — 2022-04-28T05:52:33Z
dlang/dmd pull request #14018 "fix Issue 23037 - importC: type with only type-qualifier doesn't work" was merged into stable: - c19fd72e3e592ed6a72fca46b487e3246820b042 by Walter Bright: fix Issue 23037 - importC: type with only type-qualifier doesn't work https://github.com/dlang/dmd/pull/14018
Comment #4 by dlang-bot — 2022-05-05T21:04:14Z
dlang/dmd pull request #14064 "merge stable" was merged into master: - 313d28b3db7523e67880ae3baf8ef28ce9abe9bd by Walter Bright: fix Issue 23037 - importC: type with only type-qualifier doesn't work (#14018) https://github.com/dlang/dmd/pull/14064