Path: csiph.com!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c Subject: Re: Why I use gcc Date: Fri, 07 Oct 2016 14:13:53 -0700 Organization: None to speak of Lines: 46 Message-ID: References: <046cb5f6-3629-4320-a71e-8a3e9420cc01@googlegroups.com> <7ab1eac2-0132-4b4d-9a03-bc92cd50579b@googlegroups.com> <28fd7881-5b39-4fa3-a41f-9b9431d855f3@googlegroups.com> <8e9a1124-d47f-4343-82bc-866a33455e5f@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: mx02.eternal-september.org; posting-host="945944de09706c9b4e29b53c9d2efdc2"; logging-data="16484"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+K2ROrijhIcSlFX45tZoII" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:YmAUelVPKu1F/iji1Il+EdVly/w= sha1:4iotfY4VBOZokbGqf8uqHftHLtM= Xref: csiph.com comp.lang.c:94572 Thiago Adams writes: > On Friday, October 7, 2016 at 5:10:15 PM UTC-3, Keith Thompson wrote: >> Thiago Adams writes: >> > On Friday, October 7, 2016 at 3:47:54 PM UTC-3, Bart wrote: >> > >> >> (On page 122 actually.) That section acknowledges that there are >> >> problems and goes on to demonstrate what may be an early version of >> >> Cdecl. That is, a program that converts to and from C declarations. It >> >> doesn't suggest a way of making it easier for for humans! Not without >> >> using some artificial aid. >> > >> > Yes.. I think strange declarations should be style warnings! >> > >> > int i, f(), (*f2)(), *p, a[1]; >> > typedef int i, k; >> > >> > I don't use more than one declarator in my code. >> >> Not a bad policy. >> >> > I never do this: >> > >> > int i, k; >> > >> > struct X >> > { >> > int i, k; >> > } >> >> Why not? i and k probably aren't very good names, but struct member >> names are in their own namespace; there's no real opportunity to confuse >> the variable i with the struct member i. > > The sample was not about scope..was about multiple declarators. Oh, I see. So you were contrasting struct X { int i, k; }; vs. struct X { int i; int k; }; (lines joined for brevity). Never mind, carry on. -- 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"