September 23, 2007 [Issue 1530] New: Aliasing problem in DMD front end code | ||||
---|---|---|---|---|
| ||||
http://d.puremagic.com/issues/show_bug.cgi?id=1530 Summary: Aliasing problem in DMD front end code Product: D Version: 2.004 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: bugzilla@digitalmars.com ReportedBy: dvdfrdmn@users.sf.net The following code in Parser::parseDeclarator does not follow C++ aliasing rules(?). It will malfunction when compiled by g++ 4.1.2. TypeNext *ta = new TypeFunction(arguments, t, varargs, linkage); TypeNext **pt; for (pt = (TypeNext **)&ts; *pt != t; pt = (TypeNext **)&(*pt)->next) ; *pt = ta; Suggest: Type *ta = new TypeFunction(arguments, t, varargs, linkage); Type **pt; for (pt = &ts; *pt != t; pt = &((TypeNext*)*pt)->next) ; *pt = ta; -- |
October 20, 2007 [Issue 1530] Aliasing problem in DMD front end code | ||||
---|---|---|---|---|
| ||||
Posted in reply to d-bugmail | http://d.puremagic.com/issues/show_bug.cgi?id=1530 braddr@puremagic.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED ------- Comment #1 from braddr@puremagic.com 2007-10-20 04:28 ------- Fixed in 1.022/2.005 (though only listed in the 2.005 change log currently) -- |
Copyright © 1999-2021 by the D Language Foundation