Article View: comp.std.c
Article #4103Re: Function-prototype scope: Why?
From: Christopher R. Volpe
Date: Mon, 25 Sep 1995 13:38
Date: Mon, 25 Sep 1995 13:38
18 lines
1583 bytes
1583 bytes
In article <4405ig$fmd@caip.rutgers.edu>, halasz@caip.rutgers.edu writes: >In article <DFBsED.2H1@stdc.demon.co.uk>, clive@stdc.demon.co.uk writes >: The Standard's authors prefered to have a simple concept of scope rather >: than one full of special cases. So tags have the same (prototype) scope >: as anything else within a prototype. This means you need to first declare >: the tag outside the prototype. This is trivial, and makes it clear that >: the tag used here is the same as the one used elsewhere in file scope. >But nou it is quite clear that that experiment has gone awry, and >the lack of a special case is a headake to the poor programmer. Not that clear at all. It seems to me that compilers which say, "Warning: The declaration of struct tag 'S' has prototype scope. This is probably not what you wanted." handle the situation just fine. -- Chris Volpe Phone: (518) 387-7766 (Dial Comm 8*833 GE Corporate R&D Fax: (518) 387-6560 PO Box 8, Schenectady, NY 12301 Email: volpecr@crd.ge.com
Technical Details
Message-ID:
<446bc7$r5n@rdsunx.crd.ge.com>Path:
arc1-ca.pugleaf.net!bart.crd.ge.com!volpeReferences:
<43cgmb$cec@news0.rain.rg.net> <43pdgk$b3i@rdsunx.crd.ge.com> <DFBsED.2H1@stdc.demon.co.uk> <4405ig$fmd@caip.rutgers.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!bart.crd.ge.com!volpe From: volpe@bart.crd.ge.com (Christopher R. Volpe) Newsgroups: comp.std.c Subject: Re: Function-prototype scope: Why? Date: 25 Sep 1995 13:38:15 GMT Organization: GE Corporate Research & Development Sender: volpe@bart (Christopher R. Volpe) Distribution: world Message-ID: <446bc7$r5n@rdsunx.crd.ge.com> References: <43cgmb$cec@news0.rain.rg.net> <43pdgk$b3i@rdsunx.crd.ge.com> <DFBsED.2H1@stdc.demon.co.uk> <4405ig$fmd@caip.rutgers.edu> Reply-To: volpe@ausable.crd.ge.com NNTP-Posting-Host: bart.crd.ge.com