Bug 22316 – ImportC is too permissive in allowing variable and function declarations

Status
NEW
Severity
normal
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2021-09-18T08:49:35Z
Last change time
2024-12-13T19:18:26Z
Keywords
ImportC
Assigned to
No Owner
Creator
Walter Bright
See also
https://issues.dlang.org/show_bug.cgi?id=22263, https://issues.dlang.org/show_bug.cgi?id=22317
Moved to GitHub: dmd#18057 →

Comments

Comment #0 by bugzilla — 2021-09-18T08:49:35Z
The following: int x; extern int x; // ok typedef int INT; extern INT x; // ok extern char x; // should fail but does not The same goes for functions and their types.
Comment #1 by bugzilla — 2021-09-18T09:04:18Z
An approach to solve this would be something like adding a hash table for collisions similar to tagSymTab for tag collisions.
Comment #2 by bugzilla — 2022-02-10T04:27:59Z
The problem is noted in handleSymbolRedeclarations() in dsymbol.d
Comment #3 by robert.schadek — 2024-12-13T19:18:26Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/18057 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB