another problem with PCC ICONs
Doug Gwyn <gwyn>
gwyn at brl-tgr.ARPA
Wed Mar 20 11:05:06 AEST 1985
To see another problem with integer constants in the UNIX System V
Release 2.0 VAX PCC that is related to the bugs I recently posted
fixes for, try the following program:
/* Test for another PCC ICON bug */
#define MAXSHORT ((short)0177777)
/*ARGSUSED*/
main( argc, argv )
char *argv[];
{
(void)printf( "%d %d\n", MAXSHORT, (int)MAXSHORT );
return 0;
}
Again, the USG 3.0 PCC correctly prints "-1" for both numbers,
but the 6.0 PCC (with or without my recent ICON bug fixes) prints
the second one as "65535".
I don't have a simple fix for this; I think the whole matter of
painting casts down ICON expressions needs to be reviewed and
maybe retracted.
I am curious: does anyone at AT&T USDL read these messages?
How about sending me a VAX PCC2 to test?
More information about the Net.bugs.usg
mailing list