This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Is this casting legal?


Could someone tell me how this is legal:

gcc 3.2.3 in 64b (Opteron, linux) seems not to mind,

void * foo;
(int)(word_t)foo;

Shouldn't gcc emmit a warning (as is the case of just doing a
void*->int)or an error or is this a legal cast?

TIA,
Chris


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]