Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c Subject: Re: A Note on Readability Date: Tue, 26 May 2015 12:01:57 -0700 Organization: None to speak of Lines: 63 Message-ID: <87twuzmaca.fsf@kst-u.example.com> References: <1d72d1ba-3317-4725-bedd-698843ca9c35@googlegroups.com> <67b5daac-4378-458c-a6d0-fbf4e20d8340@googlegroups.com> <29103fb2-ce27-4c7f-a189-8ff170f5e246@googlegroups.com> <555A2A66.1040201@verizon.net> <70adeda1-3b83-4a96-b57b-59ac062f0bc6@googlegroups.com> <87oalg2zq0.fsf@kst-u.example.com> <792ce9c8-075c-4b19-8a2f-ac75dab1a178@googlegroups.com> <87y4kj1667.fsf@kst-u.example.com> <87h9r5u97m.fsf@kst-u.example.com> <5218fb08-39ea-4b78-9e14-5d946aade48c@googlegroups.com> <878ucgsau6.fsf@kst-u.example.com> <7b99e2eb-6b33-4ad4-b4a6-647a44d1e181@googlegroups.com> <87617jq7uk.fsf@kst-u.example.com> <87iobhpwdd.fsf@kst-u.example.com> <87bnh8o234.fsf@kst-u.example.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="9be37d943435275679235b07c7947eef"; logging-data="18876"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/tsocJ6X/Kx1EqdKt8qvCW" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) Cancel-Lock: sha1:pXuZMfWfEkSlucGcDSYS6viWsEM= sha1:yDVCGVbpCxEM2xvOLivbdfgC+cw= Xref: csiph.com comp.lang.c:62659 David Kleinecke writes: > On Monday, May 25, 2015 at 1:05:13 PM UTC-7, Keith Thompson wrote: >> David Kleinecke writes: >> [...] >> > C90 does know about pre-defined macros (4 of them) but makes no >> > provision for additional implementation-defined macros. >> >> Yes, it does. >> >> C90 6.8.8 lists the 5 (not 4) predefined macros that "shall be defined >> by the implementation", and then says: >> >> All predefined macro names shall begin with a leading underscore >> followed by an uppercase letter or a second underscore. >> >> IMNSHO that clearly implies that compilers are permitted to predefine >> macros other than the 5 standard ones. If that were not the intent, >> then that sentence would be meaningless. Do you have a different >> interpretation? > > Yes. I read that differently. This is an extreme case of language > lawyering. But I doubt that SCOTUS will interested in resolving it. I don't see it as language lawyering, just a straightforward reading of what the standard says. *What* is your interpretation of that clause? (I thought that was implicit in my question.) Do you believe that the standard imposes a specific requirement on predefined macro names and also does not allow predefined macro names other than the ones in the list? Please clarify. > However I admit that pre-defined macros would be good to have as a tool. > > I think you have stated your opinon that I could start my code with > > _X: > > and do whatever I want thereafter - because everything is now undefined. > You really mean that? I'm going to assume that you meant to have _X: in a place where a label is syntactically valid. I really mean that if your program contains _X: in such a context, then its behavior is undefined. That doesn't mean you can do anything you want thereafter; you don't necessarily have any control over your program's behavior. _X could be a predefined macro or an implementation-defined keyword, for example. BTW, when you're posting a followup, please trim any quoted material that you're not replying to, and that's not necessary to understanding your followup. In particular, please don't quote signatures. [SNIP] -- Keith Thompson (The_Other_Keith) kst-u@mib.org Working, but not speaking, for JetHead Development, Inc. "We must do something. This is something. Therefore, we must do this." -- Antony Jay and Jonathan Lynn, "Yes Minister"