[Issue 7063] New: No error or warning for conflicting D and C symbols
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Dec 3 15:27:22 PST 2011
http://d.puremagic.com/issues/show_bug.cgi?id=7063
Summary: No error or warning for conflicting D and C symbols
Product: D
Version: D2
Platform: x86
OS/Version: Mac OS X
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: peter.alexander.au at gmail.com
--- Comment #0 from Peter Alexander <peter.alexander.au at gmail.com> 2011-12-03 15:27:20 PST ---
If you have a D symbol that mangles to the same name as a C symbol you receive
no warnings or errors and your program silently exhibits incorrect behaviour:
import std.stdio;
extern(C) void D4test3fooFZv() { writeln(1); }
void foo() { writeln(2); }
void main()
{
D4test3fooFZv();
foo();
}
For me, this outputs:
1
1
DMD should probably give an error or at least a warning when two symbols
conflict like this.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list