🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.bug
Article #959

gcc-1.40: prototype declaring static & defining extern

#959
From: Byron Rakitzis
Date: Tue, 18 Aug 1992 06:41
14 lines
724 bytes
Either ANSI C is too subtle for me, or this is a bug in gcc-1.40:

	static int foo(void);

	extern int main() {
		return foo();
	}

	extern int foo() {
		return 42;
	}

This code fails to draw any warnings from gcc (even with -Wall). I am
running under SunOS-4.1.1 on a sparc-2.
Technical Details
Message-ID: <9208180641.AA16117@netapp.netapp.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!netapp.UUCP!byron

Show Full Headers
Complete Article Headers
Newsgroups: gnu.gcc.bug
Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!netapp.UUCP!byron
From: byron@netapp.UUCP (Byron Rakitzis)
Subject: gcc-1.40: prototype declaring static & defining extern
Message-ID: <9208180641.AA16117@netapp.netapp.com>
Sender: gnulists@ai.mit.edu
Organization: GNUs Not Usenet
Distribution: gnu
Date: Tue, 18 Aug 1992 06:41:34 GMT
Approved: bug-gcc@prep.ai.mit.edu
Lines: 15