Re: struct / typedef confusion
- From: roberson@xxxxxxxxxxxxxxxxxx (Walter Roberson)
- Date: Tue, 29 May 2007 15:51:54 +0000 (UTC)
In article <f3hedp$rtn$1@xxxxxxxxxxxxxxxx>,
Guillaume Dargaud <use_the_form_on_my_contact_page@xxxxxxxxxxxxxxxx> wrote:
Still, isn't there a contradiction in having both a struct and a typedef
with the same name ?
No, C has a few different "name spaces", with a usage in one
name space not conflicting with the usage in another name space.
For example, statement labels don't conflict with ordinary
identifiers. In 30 seconds reading of C89 I'm left uncertain
exactly which name space is used for typedefs, but the
tags of structures, unions, and enumerations are specifically
noted as being disambiguated by the presence of the
'struct', 'union' or 'enum' tag.
--
Okay, buzzwords only. Two syllables, tops. -- Laurie Anderson
.
- References:
- struct / typedef confusion
- From: Guillaume Dargaud
- Re: struct / typedef confusion
- From: Walter Roberson
- Re: struct / typedef confusion
- From: Guillaume Dargaud
- struct / typedef confusion
- Prev by Date: Re: struct / typedef confusion
- Next by Date: Re: question on C language
- Previous by thread: Re: struct / typedef confusion
- Next by thread: Re: struct / typedef confusion
- Index(es):
Relevant Pages
|