This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Is this casting legal?
- From: Chris Croswhite <csc at cadence dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: Tue, 30 Mar 2004 00:15:04 +0000
- Subject: Is this casting legal?
- Organization: Cadence Design Systems
- Reply-to: csc at cadence dot com
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