When operator new is used on a class with no constructor it generates an AGGR_INIT_EXPR, not a CALL_EXPR... with testcase. NPODB, static-checking only.
This commit is contained in:
@@ -167,11 +167,12 @@ function process_cp_pre_genericize(fndecl)
|
||||
break;
|
||||
|
||||
case CALL_EXPR:
|
||||
case AGGR_INIT_EXPR:
|
||||
assign = stack[i + 1];
|
||||
break;
|
||||
|
||||
default:
|
||||
error("Unrecognized assignment from operator new: " + TREE_CODE(assign), getLocation());
|
||||
error("Unrecognized assignment from operator new: %s. Tree code stack: %s".format(TREE_CODE(assign), [TREE_CODE(s) for each (s in stack)].join(",")), getLocation());
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user