Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #67531

Re: Labels

From James Kuyper <jameskuyper@verizon.net>
Newsgroups comp.lang.c
Subject Re: Labels
Date 2015-08-16 11:59 -0400
Organization Self
Message-ID <55D0B37A.2070901@verizon.net> (permalink)
References (3 earlier) <55CFC58E.5090600@verizon.net> <87mvxsf713.fsf@bsb.me.uk> <55CFD75B.6020102@verizon.net> <mqon12$20n$1@dont-email.me> <lnbne87xuo.fsf@kst-u.example.com>

Show all headers | View raw


On 08/15/2015 10:47 PM, Keith Thompson wrote:
> Bartc <bc@freeuk.com> writes:
...
>> You mean that a label can have the same name as a typedef within the 
>> same function scope?
> 
> Yes.

Pedantic details:
A label has function scope, and is the only kind of thing that can have
function scope; a typedef has either file scope or block scope depending
upon where it is declared. Two scopes are considered the "same scope" if
they end at the same place (6.2.1p5), even if they are different types
of scope. Therefore, a function scope can be the same scope as a block
scope, but only for the outermost block of a function. However, because
they are in different name spaces, the fact that a label and a typedef
could have the same scope never actually matters.

Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Labels David Kleinecke <dkleinecke@gmail.com> - 2015-08-15 09:46 -0700
  Re: Labels James Kuyper <jameskuyper@verizon.net> - 2015-08-15 14:49 -0400
    Re: Labels David Kleinecke <dkleinecke@gmail.com> - 2015-08-15 18:48 -0700
  Re: Labels Bartc <bc@freeuk.com> - 2015-08-15 18:27 +0100
    Re: Labels Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-08-15 23:44 +0100
      Re: Labels James Kuyper <jameskuyper@verizon.net> - 2015-08-15 19:04 -0400
        Re: Labels Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-08-16 00:47 +0100
          Re: Labels James Kuyper <jameskuyper@verizon.net> - 2015-08-15 20:20 -0400
            Re: Labels Bartc <bc@freeuk.com> - 2015-08-16 01:56 +0100
              Re: Labels Keith Thompson <kst-u@mib.org> - 2015-08-15 19:47 -0700
                Re: Labels James Kuyper <jameskuyper@verizon.net> - 2015-08-16 11:59 -0400
            Re: Labels Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-08-16 22:42 +0100
              Re: Labels James Kuyper <jameskuyper@verizon.net> - 2015-08-16 20:39 -0400
                Re: Labels Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-08-17 03:16 +0100
        Re: Labels David Kleinecke <dkleinecke@gmail.com> - 2015-08-15 19:01 -0700
      Re: Labels Bartc <bc@freeuk.com> - 2015-08-16 01:11 +0100
        Re: Labels Keith Thompson <kst-u@mib.org> - 2015-08-15 19:13 -0700
          Re: Labels Bartc <bc@freeuk.com> - 2015-08-16 10:34 +0100
            Re: Labels Keith Thompson <kst-u@mib.org> - 2015-08-16 13:58 -0700
            Re: Labels David Kleinecke <dkleinecke@gmail.com> - 2015-08-16 20:42 -0700
              Re: Labels Keith Thompson <kst-u@mib.org> - 2015-08-16 21:24 -0700
                Re: Labels David Kleinecke <dkleinecke@gmail.com> - 2015-08-17 18:01 -0700
              Re: Labels Bartc <bc@freeuk.com> - 2015-08-17 11:04 +0100
        Re: Labels David Kleinecke <dkleinecke@gmail.com> - 2015-08-15 19:04 -0700
        Re: Labels Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-08-16 23:55 +0100
    Re: Labels David Kleinecke <dkleinecke@gmail.com> - 2015-08-15 19:00 -0700

csiph-web