🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #2134

Re: Static function prototypes and definitions

#2134
From: Lawrence H. Miller
Date: Thu, 15 Oct 1992 17:15
29 lines
1589 bytes
In article <1992Oct15.011402.19588@nntpd.lkg.dec.com> diamond@jit.dec.com (Norman Diamond) writes:
>>FILE SCOPE, i.e., from the START to the END of the file.
>
>The first identifier "g" has block scope.  The second identifier "g" has
>file scope.  The second one's scope (file scope) ends at the end of the
>translation unit, exactly as in the text you quoted.  Why didn't you quote
>the text that says where the scope starts, instead of guessing?  Lines 39
>to 42 on the same page.  Since this isn't a tag or enumeration constant,
>the final sentence applies:  "Any other identifier has scope that begins
>just after the completion of its declarator."

	You're right.  This issue is now dead.

	void f(void){void g(void);}
	static void g(void){}

	produced undefined results, while

	void f(void){static void g(void);}
	static void g(void){}

	is invalid via 3.5.1 lines 19 and 20.
	[Note, though, that this is under Semantics, while it should
	clearly be under Constraints.]

-- 
Larry Miller		The Aerospace Corporation
lmiller@aero.org	PO Box 92957		
310-336-5597		LA, CA 90009-2957
Technical Details
Message-ID: <1bk8usINNjkf@news.aero.org>
Path: arc1-ca.pugleaf.net!sparky!uunet!hela.iti.org!usc!news.aero.org!lmiller
References: <bjFLFApU@twinsun.com> <1bi565INNgc1@news.aero.org> <1992Oct15.011402.19588@nntpd.lkg.dec.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!hela.iti.org!usc!news.aero.org!lmiller
From: lmiller@aero.org (Lawrence H. Miller)
Newsgroups: comp.std.c
Subject: Re: Static function prototypes and definitions
Date: 15 Oct 1992 17:15:08 GMT
Organization: The Aerospace Corporation, El Segundo, CA
Lines: 29
Message-ID: <1bk8usINNjkf@news.aero.org>
References: <bjFLFApU@twinsun.com> <1bi565INNgc1@news.aero.org> <1992Oct15.011402.19588@nntpd.lkg.dec.com>
NNTP-Posting-Host: palomar.aero.org