This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [rfc] fix c/21502
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Richard Henderson <rth at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 10 May 2005 23:08:40 +0000 (UTC)
- Subject: Re: [rfc] fix c/21502
- References: <20050510192805.GA20480@redhat.com><Pine.LNX.4.61.0505101954360.15600@digraph.polyomino.org.uk><20050510214427.GA20680@redhat.com> <Pine.LNX.4.61.0505102232060.15600@digraph.polyomino.org.uk><20050510225314.GB20751@redhat.com>
On Tue, 10 May 2005, Richard Henderson wrote:
> On Tue, May 10, 2005 at 10:33:36PM +0000, Joseph S. Myers wrote:
> > Yes (as a quality-of-implementation matter, not a standard requirement).
> > It does in 3.4. It ought to do so immediately after my patch for bug
> > 21342 as well but I don't have a build tree with that patch around.
>
> Hum, yes. The following update seems to do what you want. It
> doesn't do your number 2 test; I have no idea what you'd want
> for that.
>
> Seem ok? Or good enough at least? This is fixing a bootstrap
> failure after all...
It seems OK (with the first test I gave
typedef int IA[];
typedef int IA5[5];
typedef int IA10[10];
typedef IA *IAP;
typedef IA5 *IA5P;
typedef IA10 *IA10P;
extern IAP a[];
void
f (void)
{
extern IA5P a[];
}
IAP a[] = { 0 };
extern IA10P a[];
added to the testsuite to make sure the incompatible types of 'a' are
diagnosed). As the second test
extern int a[];
void f(void) { extern int a[2]; }
int a[] = { 0 };
isn't a regression - no GCC version I have diagnoses it - it can wait and
be dealt with later on mainline only.
--
Joseph S. Myers http://www.srcf.ucam.org/~jsm28/gcc/
jsm@polyomino.org.uk (personal mail)
joseph@codesourcery.com (CodeSourcery mail)
jsm28@gcc.gnu.org (Bugzilla assignments and CCs)