Path: utzoo!mnetor!uunet!ncc!alberta!att-ih!ihnp4!ihlpg!tainter From: tainter@ihlpg.ATT.COM (Tainter) Newsgroups: comp.lang.c Subject: Re: Quote without comment on char constant expansion Message-ID: <5206@ihlpg.ATT.COM> Date: 14 Apr 88 21:55:35 GMT References: <4418@hoptoad.uucp> <3432@haddock.ISC.COM> <7677@brl-smoke.ARPA> <11056@mimsy.UUCP> Organization: AT&T Bell Laboratories - Naperville, Illinois Lines: 22 In article <11056@mimsy.UUCP>, chris@mimsy.UUCP (Chris Torek) writes: > The argument against this, of course, is that somehow `stringize' > is useful while `charize' is not, or not enough so. Is "ABCD"[0] TM legal ANSI C? If not, why not? It certainly works in AT&T R&D UNIX C. If so then (#x[0]) becomes a 'charize' expression equivalent to a direct charize operator for all intents and purposes. I can't seriously imagine a compiler not optimizing this expression to the character constant. > In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163) --j.a.tainter