🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Paul Eggert Thu, 13 Aug 1992 20:57
GCC 2.2.2 diagnoses each initialized parameter twice
#940
Author: Paul Eggert
Date: Thu, 13 Aug 1992 20:57
34 lines
1332 bytes
For the erroneous program

	int main(argc) int argc = 0; { return 0; }

GCC 2.2.2 outputs the same diagnostic twice:

	t.c:1: parameter `argc' is initialized
	t.c:1: parameter `argc' is initialized

Here is a patch.

Thu Aug 13 20:53:00 1992  Paul Eggert  (eggert@twinsun.com)

	* c-decl.c (grokdeclarator): Remove duplicate diagnostic for
	initialized parameters; start_decl already does this.

===================================================================
RCS file: c-decl.c,v
retrieving revision 2.2.2.3
diff -c -r2.2.2.3 c-decl.c
*** c-decl.c	1992/08/11 19:43:13	2.2.2.3
--- c-decl.c	1992/08/13 20:53:00
***************
*** 3950,3958 ****
  	    volatilep = constp = 0;
  	  }
  
- 	if (initialized)
- 	  error ("parameter `%s' is initialized", name);
- 
  	decl = build_decl (PARM_DECL, declarator, type);
  	if (size_varies)
  	  C_DECL_VARIABLE_SIZE (decl) = 1;
--- 3950,3955 ----
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads