The first bit of guidance is ... Don't Do That!!
I could not quite figure out what you meant, but this compiled for me with no
errors
struct S
{
int i;
};
void X()
{
S * p;
char Buffer[1000];
p = (S *) Buffer;
p = reinterpret_cast<S *>(Buffer);
// no way static_cast will work here! (And it should not)
}
using
xlC -qversion
z/OS V2.3 XL C/C++
Don't forget that if you try to defeat the type system with casts, you should
use the NOANSIALIAS option is compiling with optimization.
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN