[cfe-dev] bugfix(1908): http://llvm.org/bugs/show_bug.cgi?id=1908

Csaba Hruska csaba.hruska at gmail.com
Tue Jan 22 13:29:19 PST 2008


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20080122/e4f262b0/attachment.html>


More information about the cfe-dev mailing list