Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!henry From: henry@utzoo.UUCP (Henry Spencer) Newsgroups: comp.lang.c Subject: Re: Questions on X3J11 draft Message-ID: <7373@utzoo.UUCP> Date: Thu, 4-Dec-86 13:32:30 EST Article-I.D.: utzoo.7373 Posted: Thu Dec 4 13:32:30 1986 Date-Received: Thu, 4-Dec-86 13:32:30 EST References: <351@danews.ATT.COM> Organization: U of Toronto Zoology Lines: 52 Keywords: C,X3J11 > 1) What is the unary plus operator I've heard ? Is it an attempt > to force ordering in expression evaluation ? ... Unary plus was introduced originally, as I understand it, for various minor reasons. (For example, "+204" is a valid number when read by printf, but is illegal in a [pre-X3J11] C program, which seems undesirable.) It has since been overloaded as an optimization fence, which I'm not keen on. I can see the desirability of such a fence; splitting up expressions and evaluating the pieces separately can be a major pain, and makes code much harder to read. I can't say as I like unary plus as the syntax for the fence, though. > 2) Can I do something like this: > > #define ABC=100 No, not with the semantics you obviously are thinking of. Why would you want to? That is not C, and never has been. It might perhaps be the right way to do it if one were designing a new language, but that's not the issue at hand. > 3) Can I do something like this: > > char a[sizeof(struct name *)0->element]; Don't think so. Have you considered determining the type of "element" and saying "char a[sizeof(the_type)]"? It is agreed that this would be a bit simpler with a "typeof" operator, but it's not a disaster even so; at worst it means an extra macro or typedef to give the type a name of its own. > 4) Are there provisions for future modifications to the standard? I believe all ANSI standards have provisions for future review. The people who do these things are not idiots. > 5) Has any attempt been made to see what percentage of existing > code (say at AT&T or wherever) would break under the X3J11 draft? I suspect AT&T has been paying close attention to this, although I don't know of any actual numbers. The intent all along has been that existing *legal* code will not break. > 6) On a more philosophical note, I object to the use of the name > C for the language. Unless Dennis Ritchie has said he doesn't > mind... Dennis has been involved with X3J11, although not deeply; last I heard, he approved. I know he liked the idea of someone else taking over the role of ultimate authority on C. -- Henry Spencer @ U of Toronto Zoology {allegra,ihnp4,decvax,pyramid}!utzoo!henry