typedef scope mess

Tom Stockfisch tps at sdchem.UUCP
Sat Jun 14 06:30:40 AEST 1986


>[redefinition of typedef as auto works on one machined but not another...].
>Thus, I would suggest being very careful since
>you never know what compiler your code may see next.  Not only that, but it
>is just plain bad design to overload typedefs, depending on scoping to save
>the functionality of the code.  [Couldn't resist my two cents worth.]
>
>	Dan Jones
>		...!trwrb!jcc-one!djones

Do you also think reusing an *extern* name in a local block is "plain bad
design"?  I can't see the difference.  I agree you should avoid overloading
names, but the idea behind the overloading classes is so you can confidently
define local variables which are guaranteed to be independent of the rest of
your project.  Not having to worry about a typedef defined in some 'include'
file improves modularity.

-- Tom Stockfisch, UCSD Chemistry



More information about the Comp.lang.c mailing list