D
destroyedlolo
Hi all,
I just upgrade my workstation to Gcc 3.3, and I got a very strange
probleme with casting : I got an error if I try to get the adress of a
"casted" pointer.
---- dumy example source code ------
class tata {
int a;
};
int main(int, char **){
void *toto;
tata **tst_ptr = &((tata *)toto);
}
-------------------------------
[faillie]/home/faillie/src $ g++ tst.cxx
tst.cxx: In function `int main(int, char**)':
tst.cxx:7: error: non-lvalue in unary `&'
I duno if it's normal or not (I don't see why the compiler think this
casted stuff is not a "lvalue"), but do you know how to compile such
thing ?
If it's a GCC bug, I'm very bad as it's the only version I have on my
HPUX workstation :-(
Thanks for your help
Laurent
I just upgrade my workstation to Gcc 3.3, and I got a very strange
probleme with casting : I got an error if I try to get the adress of a
"casted" pointer.
---- dumy example source code ------
class tata {
int a;
};
int main(int, char **){
void *toto;
tata **tst_ptr = &((tata *)toto);
}
-------------------------------
[faillie]/home/faillie/src $ g++ tst.cxx
tst.cxx: In function `int main(int, char**)':
tst.cxx:7: error: non-lvalue in unary `&'
I duno if it's normal or not (I don't see why the compiler think this
casted stuff is not a "lvalue"), but do you know how to compile such
thing ?
If it's a GCC bug, I'm very bad as it's the only version I have on my
HPUX workstation :-(
Thanks for your help
Laurent