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]

c++/2124: Misleading error message when name conflicts detected



>Number:         2124
>Category:       c++
>Synopsis:       Misleading error message when name conflicts detected
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Feb 28 06:36:00 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     stephen.webb@cybersafe.com
>Release:        gcc version 3.0 20010219 (prerelease)
>Organization:
>Environment:

>Description:
The following code fragment

// ...begin pig.cpp ...
typedef int T;
namespace A { typedef int T; }
using A::T;
// ... end pig.cpp ...

compiled with "gcc -c pig.cpp" gives the following error message.

pig.cpp:3: using directive `T' introduced ambiguous type `T'

This is incorrect, since there are no using directives in scope.
The error message should read 'using declaration' instead.
>How-To-Repeat:
See description.
>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]