[Issue 8913] New: Wrong code in IfStatement condition Expression
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Oct 30 06:44:10 PDT 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8913
Summary: Wrong code in IfStatement condition Expression
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: ibuclaw at ubuntu.com
--- Comment #0 from Iain Buclaw <ibuclaw at ubuntu.com> 2012-10-30 06:44:09 PDT ---
struct A {
char[1] b;
}
void main()
{
A c;
if (*c.b.ptr)
return;
return;
}
The following of type char
====
*c.b.ptr
====
Generates and sends to the backend as type char[1]
====
c.b
====
This is wrong and invalid (non-scalar types cannot be used as boolean types).
Regards
Iain.
--
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