[net.lang.c] fun with your pcc-based compiler

jas@rtech.ARPA (Jim Shankland) (05/07/85)

Anybody want to guess how pcc-based compilers interpret the integer
constant "0x"?  How about "00x34"?

(That is, as in:

	main()  {

	int i;
	i = 0x;		/* or 00x34 ... */
	printf( "%x\n", i );
	}

).

Have fun.

Jim Shankland
Relational Technology, Inc.
..!ucbvax!mtxinu!rtech!jas
..!ihnp4!pegasus!rtech!jas

brooks@lll-crg.ARPA (Eugene D. Brooks III) (05/11/85)

> Anybody want to guess how pcc-based compilers interpret the integer
> constant "0x"?  How about "00x34"?
> 
> (That is, as in:
> 
> 	main()  {
> 
> 	int i;
> 	i = 0x;		/* or 00x34 ... */
> 	printf( "%x\n", i );
> 	}
> 
> ).
> 
> Have fun.
> 
> Jim Shankland
> Relational Technology, Inc.
> ..!ucbvax!mtxinu!rtech!jas
> ..!ihnp4!pegasus!rtech!jas

Typing in some text to /lib/ccom my only reaction is WOW!

gwyn@brl-tgr.ARPA (Doug Gwyn <gwyn>) (05/14/85)

> > Anybody want to guess how pcc-based compilers interpret the integer
> > constant "0x"?  How about "00x34"?

Ok, I give up, what's your answer?
(mine is, 0 for "0x" and not legal for "00x34")