reflaxe.CPP
reflaxe.CPP copied to clipboard
Bad pointer to pointer generation
Building
function main() {
var i:Int = 123;
var p:cxx.Ptr<Int> = i;
var pp:cxx.Ptr<cxx.Ptr<Int>> = p;
trace(pp); // bypass dce
}
Will generate the output
int i = 123;
int* p = &i;
int* pp = p;
Shouldn't it be int** pp = &p?
Ooof, yeah, I forgot about pointer stacking. As always, thanks for the report! I think for this, I might be able to add a secondary, optional parameter as well, something like cxx.Ptr<T, 2> to generate T** without having to write out so many Ptr classes.
On unrelated note, I seriously appreciate all these issues!! Sorry for the delay in response, busy atm, but I should be able to begin work on Reflaxe/C++ shortly and fix all of these!