[gnu.gcc.bug] Is this legal?

paul@UUNET.UU.NET (Paul Hudson) (06/21/89)

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"

ham@Neon.Stanford.EDU (Peter R. Ham) (02/24/90)

extern sprintf(char *__s, char *__format, ...);
extern sprintf();

gcc complains about conflicting types.

Is this code legal ansi C?

--
Peter Ham			PO Box 3430	(h)(415) 322-4390
MS Computer Science Student	Stanford, CA	ham@cs.stanford.edu
Stanford University 		94309		(o)(415) 723-2067