8 bytes into 2 bytes fits ?

David C Binderman dcb@pncl.co.uk
Wed Sep 2 11:35:00 GMT 1998


Hello there,

// surely pointers can only be cast to types big enough to hold
// them. This code compiles ok on Linux/Alpha egcs-980824, even with
// -ansi -pedantic-errors

void
f( char * p)
{
	short s = (short) p;
}

Regards
David C Binderman MSc BSc	+44 1293 534847		dcb@pncl.co.uk




More information about the Gcc-bugs mailing list