🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.bug
Article #115

Is this legal?

#115
From: Paul Hudson
Date: Wed, 21 Jun 1989 09:52
20 lines
1046 bytes
I accidently used the same name for two different static variables of
the same type, and so declared the variable twice eg:

static int a;

and later

static int a;

Sun CC warns about this (indeed, it's an error), but gcc doesn't. Is
this a bug in gcc? or does ANSI allow this.

Even if it is allowed, I'd like it to (optionally) warn about it since
in this case the error message did uncover a bug.

Paul Hudson	 MAIL: Monotype ADG, Science Park, Cambridge, CB4 4FQ, UK.
		PHONE: +44 (223) 420018	  EMAIL: paul@moncam.co.uk,
	;"	  FAX: +44 (223) 420911		 ...!ukc!acorn!moncam!paul
 `"";";"        "/dev/null full: please empty the bit bucket"
Technical Details
Message-ID: <8906210952.AA03418@marvin.moncam.uucp>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!UUNET.UU.NET!moncam!paul

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!UUNET.UU.NET!moncam!paul
From: moncam!paul@UUNET.UU.NET (Paul Hudson)
Newsgroups: gnu.gcc.bug
Subject: Is this legal?
Message-ID: <8906210952.AA03418@marvin.moncam.uucp>
Date: 21 Jun 89 09:52:56 GMT
Sender: daemon@tut.cis.ohio-state.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 20