Hi!
i've tryed to fix this bug, but it is donw with some code disabling. is it
correct ?

Index: Sema/SemaDecl.cpp
===================================================================
--- Sema/SemaDecl.cpp   (revision 46257)
+++ Sema/SemaDecl.cpp   (working copy)
@@ -338,10 +338,12 @@
     return New;
   }
   // We've verified the types match, now check if Old is "extern".
+  /*
   if (Old->getStorageClass() != VarDecl::Extern) {
     Diag(New->getLocation(), diag::err_redefinition, New->getName());
     Diag(Old->getLocation(), diag::err_previous_definition);
   }
+  */
   return New;
 }

with this modification this code passes:
const int a [1] = {1};
extern const int a[];

i've another question or problem: is type checking correct for typedefs ?
ex: this code fails still after the bugfix:
typedef int i;
const int a [1] = {1};
extern const i a[];


is areEquivalentArrayTypes function correct ?


cheers,
Csaba Hruska
_______________________________________________
cfe-dev mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev

Reply via email to