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: Scope of identifiers Date: Mon, 12 Jun 2017 09:38:25 -0700 Organization: None to speak of Lines: 22 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: mx02.eternal-september.org; posting-host="defc4e5ae30e31482245c2bebee97ffa"; logging-data="11657"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19jaEstUEMlmfy9n0aNZdh7" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:fgg6TIC4RteQpQ6ygwweV+fVaUg= sha1:x+eCgxebFiF2X7lE7KBphTbrf0U= Xref: csiph.com comp.lang.c:112055 Steve Keller writes: > While reading again in the standard about declarations and (tentative) > definitions, and linkage, I also read about scope of identifiers and > was confused: > > The standard says in 6.2.1p6 that "two identifiers have the same > scope if and only if their scopes terminate at the same point." Yes, and the phrase "same scope" is in italics, which means this is the definition of the term. Two identifiers can have the *same scope* even if their scopes begin in different places. It might have been less confusing if the standard had used a different phrase, perhaps "matching scope". [...] -- 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"