New 'n' Improved comp.lang.c FAQ List

Karl Heuer karl at ima.isc.com
Thu Apr 4 12:35:48 AEST 1991


In article <11742 at dog.ee.lbl.gov> torek at elf.ee.lbl.gov (Chris Torek) writes:
>You must use two levels of macro evaluation:
>	#define XQUOTE(a)	QUOTE(a)	/* expanded quote */
>		static char retbuf[sizeof(XQUOTE(INT_MIN))];

But you still don't necessarily get the right answer, since INT_MIN might not
be implemented as a simple digit-string.  If <limits.h> defines INT_MIN as
(1<<31), the sizeof() will only return 8.

Karl W. Z. Heuer (karl at ima.isc.com or uunet!ima!karl), The Walking Lint



More information about the Comp.lang.c mailing list