This is the mail archive of the gcc-bugs@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]

c++/9924: Multiple using __gnu_cxx::llabs breaks compilation.


>Number:         9924
>Category:       c++
>Synopsis:       Multiple  using __gnu_cxx::llabs breaks compilation.
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          rejects-legal
>Submitter-Id:   net
>Arrival-Date:   Mon Mar 03 19:26:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     yaqb at poczta dot neostrada dot pl
>Release:        gcc-3.1 up to 3.2.2
>Organization:
>Environment:
1. Debian GNU/Linux Unstable 
   Athlon XP 1600+, 512MB
2. Debian GNU/Linux Testing 
   P4 1,7, 512MB
>Description:
This is reduced ../cstdlib file (without second
using directive):
// ----- test.cpp -----------------------------
namespace __gnu_cxx {
    void llabs(long long x);
}

namespace std {
    using __gnu_cxx::llabs;
    using __gnu_cxx::llabs;
}
// -------------------------------
Compilation of this code cause GCC to print:
test.cpp:9: `llabs' is already declared in this scope

This bug exists in gcc-3.1 up to gcc 3.2.2. It seems
that verion 3.0.4 is ok. I haven't check 3.3 or 3.4
version.

Bug does not occures if
1. compiling wiht -fno-builtin option 
2. If using different function than llabs or llabs
with different arguments list.
3. There is different namespace than std
>How-To-Repeat:
g++ test.cpp
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


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