This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [C++ PATCH] Fix extern "C" function and namespace handling
- To: brent verner <brent at rcfile dot org>
- Subject: Re: [C++ PATCH] Fix extern "C" function and namespace handling
- From: Kriang Lerdsuwanakij <lerdsuwa at scf dot usc dot edu>
- Date: Sun, 8 Oct 2000 16:35:57 -0700 (PDT)
- cc: gcc-patches <gcc-patches at gcc dot gnu dot org>
On Sun, 8 Oct 2000, brent verner wrote:
> FWIW, the following code is still busted after both patches applied.
> AFAICT, it looks like another test will have to be added to
> do_nonmember_using_decl() to accomodate this, what are your
> (group-at-large, also) thoughts on this approach?
>
> thanks.
> brent
>
>
> namespace _C_ {
> extern "C" int abs(int a);
> }
> namespace std {
> inline int abs(int a){ return a >= 0 ? a : - a; } // error
> inline long abs(long a){ return a >= 0 ? a : - a; } // OK
> }
>
> using namespace std // OK
Is it just because the trailing ';' is missing from the above line?
It works for me after the fix.
> using std::abs; // error
>
> int main()
> {
> using std::abs; // OK
> abs(5);
> return 0;
> }