http://d.puremagic.com/issues/show_bug.cgi?id=5167
Summary: argument to function expecting a C callback parameter
isn't checked for linkage type
Product: D
Version: D1 & D2
Platform: All
OS/Version: All
Status: NEW
Keywords: accepts-invalid, diagnostic
Severity: normal
Priority: P2
Component: DMD
AssignedTo: [email protected]
ReportedBy: [email protected]
--- Comment #0 from Trass3r <[email protected]> 2010-11-05 04:55:30 PDT ---
extern(C)
{
alias /* extern(C)*/ void function() ft;
void func(ft fp)
{
fp();
}
}
void foo()
{
}
void main()
{
func(&foo);
}
This compiles just fine even though foo has improper linkage.
I guess this could yield a corrupt stack when used with a C library.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------