🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #5986

Re: Multiple typedefs

#5986
From: Doug Gwyn
Date: Tue, 02 May 1989 05:38
13 lines
1083 bytes
In article <2402@lethe.UUCP> dave@lethe.UUCP (Dave Collier-Brown) writes:
>  Is there a technical reason for the difference in redefinition rules
>for macros -vs- typedefs, ...?

Yes.

Oh, you want to know what it is?  Well, consider how the compiler is
going to parse a complex declaration containing several typedefs.
How does it know whether you are defining the same typedef a second
time or are just using it to help typedef something else?

There's no analogous problem with #define, due to its unambiguous
syntax that makes it clear what identifier is being defined.
Technical Details
Message-ID: <10190@smoke.BRL.MIL>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!dogie.macc.wisc.edu!indri!aplcen!haven!adm!smoke!gwyn
References: <2322@lethe.UUCP> <10167@smoke.BRL.MIL> <2402@lethe.UUCP>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!dogie.macc.wisc.edu!indri!aplcen!haven!adm!smoke!gwyn
From: gwyn@smoke.BRL.MIL (Doug Gwyn)
Newsgroups: comp.std.c
Subject: Re: Multiple typedefs
Keywords: typedefs, includes, defines
Message-ID: <10190@smoke.BRL.MIL>
Date: 2 May 89 05:38:25 GMT
References: <2322@lethe.UUCP> <10167@smoke.BRL.MIL> <2402@lethe.UUCP>
Reply-To: gwyn@brl.arpa (Doug Gwyn)
Organization: Ballistic Research Lab (BRL), APG, MD.
Lines: 13