ANSI typedef rules
Chris Torek
torek at elf.ee.lbl.gov
Fri Mar 15 17:24:32 AEST 1991
In article <793 at llnl.LLNL.GOV> rjshaw at ramius.llnl.gov (Robert Shaw) writes:
>In regards to ANSI C, what (if anything) does the standard say about
>an identifer that is in the scope of both a typedef and a variable
>declaration by the same name?
A typedef makes a synonym for an existing type up until it is overriden
by a local (block scope) declaration for a variable; it is then hidden
(and therefore entirely unusable) until that block scope is ended.
Gcc 1.37.1 is doing exactly the right thing in your example.
--
In-Real-Life: Chris Torek, Lawrence Berkeley Lab EE div (+1 415 486 5427)
Berkeley, CA Domain: torek at ee.lbl.gov
More information about the Comp.lang.c
mailing list