public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/13801] [3.4/3.5 Regression] Decls should regain old type at end of scope
Date: Thu, 26 Aug 2004 21:30:00 -0000	[thread overview]
Message-ID: <20040826213043.4818.qmail@sourceware.org> (raw)
In-Reply-To: <20040121215609.13801.jsm28@gcc.gnu.org>


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-08-26 21:30 -------
Subject: Bug 13801

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	jsm28@gcc.gnu.org	2004-08-26 21:30:26

Modified files:
	gcc            : ChangeLog c-decl.c 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/gcc.dg/debug: redecl-1.c redecl-2.c redecl-3.c 
	                            redecl-4.c redecl-5.c 
	gcc/testsuite/gcc.dg: redecl-3.c redecl-4.c redecl-6.c 
	                      redecl-7.c redecl-8.c redecl-9.c 
	                      redecl-10.c 

Log message:
	PR c/13801
	* c-decl.c (struct c_binding): Add type and inner_comp fields.
	(bind): Set type and inner_comp fields.
	(pop_scope): Restore type of decl to the correct type from an
	outer scope.  Give error when popping file scope for incomplete
	arrays completed incompatibly with default initialization in an
	inner scope.
	(diagnose_mismatched_decls): Handle externs with initializers at
	block scope.
	(pushdecl): Set type of external declaration at block scope based
	only on the visible declarations.  Save type when changing the
	type of a declaration.  Merge an external declaration at block
	scope with a visible static declaration at file scope.
	(implicitly_declare): Give recycled old declaration the new type
	except for incompatible declarations of built-in functions, saving
	the old type.
	
	testsuite:
	* gcc.dg/redecl-3.c, gcc.dg/redecl-4.c, gcc.dg/redecl-6.c,
	gcc.dg/redecl-7.c, gcc.dg/redecl-8.c, gcc.dg/redecl-9.c,
	gcc.dg/redecl-10.c, gcc.dg/debug/redecl-1.c,
	gcc.dg/debug/redecl-2.c, gcc.dg/debug/redecl-3.c,
	gcc.dg/debug/redecl-4.c, gcc.dg/debug/redecl-5.c: New tests.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.5110&r2=2.5111
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/c-decl.c.diff?cvsroot=gcc&r1=1.563&r2=1.564
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.4200&r2=1.4201
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/debug/redecl-1.c.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/debug/redecl-2.c.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/debug/redecl-3.c.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/debug/redecl-4.c.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/debug/redecl-5.c.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/redecl-3.c.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/redecl-4.c.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/redecl-6.c.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/redecl-7.c.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/redecl-8.c.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/redecl-9.c.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/redecl-10.c.diff?cvsroot=gcc&r1=NONE&r2=1.1



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13801


  parent reply	other threads:[~2004-08-26 21:30 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-21 21:56 [Bug c/13801] New: " jsm28 at gcc dot gnu dot org
2004-01-21 21:59 ` [Bug c/13801] [3.4/3.5 Regression] " pinskia at gcc dot gnu dot org
2004-01-22 21:07 ` zack at gcc dot gnu dot org
2004-03-01  5:15 ` mmitchel at gcc dot gnu dot org
2004-08-11 21:05 ` jsm28 at gcc dot gnu dot org
2004-08-26 21:30 ` cvs-commit at gcc dot gnu dot org [this message]
2004-08-26 21:45 ` pinskia at gcc dot gnu dot org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040826213043.4818.qmail@sourceware.org \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).