This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [rfc] fix c/21502


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)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]