[patch] libgloss/arm: Cast arguments to do_AngelSWI to int.

Paul Brook paul@codesourcery.com
Tue Dec 26 05:52:00 GMT 2006


> I take your point about the union being a little heavy handed for what
> is being coded here, but given the number of subtle problems that can be
> caused by aliasing, I think that it is wise to always code pointer to
> integer conversions using unions, even when they do not appear to be
> necessary.  Better safe than sorry.

I'm not convinced by your argument. Aliasing int and void* via unions is a gcc 
extension. Casting a void* to an int is legal C.

Paul



More information about the Newlib mailing list