This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: 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:22:29 +0000
- Subject: Re: Is this casting legal?
- Organization: Cadence Design Systems
- References: <1080605704.1338.25.camel@chrisc.laptop>
- Reply-to: csc at cadence dot com
Wrong wording, should be, no emitted error/warning. Sorry for the
confusion.
On Tue, 2004-03-30 at 00:15, Chris Croswhite wrote:
> 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
>