[cfe-commits] r58008 - /cfe/trunk/lib/Sema/SemaDecl.cpp
Argiris Kirtzidis
akyrtzi at gmail.com
Wed Oct 22 18:39:04 PDT 2008
Douglas Gregor wrote:
>
> I don't think this is the right fix. If we find an invalid
> redeclaration, we should just drop the redeclaration.
Makes sense, but before I apply some fix I'd like to make sure, is this
definitely the intended behavior ? Currently there's a test that assumes
that name lookup finds the latest redeclaration, even if it's invalid.
From test/Sema/predefined-function.c :
int eli(float b); // expected-error {{previous declaration is here}}
int b(int c) {return 1;}
int foo();
int foo()
{
int eli(int (int)); // expected-error {{conflicting types for 'eli'}}
eli(b); #1
return 0;
}
At #1, it's supposed to pick up the invalid redeclaration at the
previous line.
> There may still be uses for overloading when we're not in C++ mode
> (e.g., for <tgmath.h>).
Could you explain a bit more about this ?
-Argiris
More information about the cfe-commits
mailing list