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;
Comment #1 by braddr — 2007-10-20T04:28:03Z
Fixed in 1.022/2.005 (though only listed in the 2.005 change log currently)