This is the mail archive of the gcc-bugs@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]

8 bytes into 2 bytes fits ?



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



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