Bug 11697 - [3.3 Regression] Failure to diagnose class template redeclaration via using declaration
Summary: [3.3 Regression] Failure to diagnose class template redeclaration via using d...
Status: RESOLVED WONTFIX
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 3.4.0
: P1 normal
Target Milestone: 3.3.3
Assignee: Mark Mitchell
URL:
Keywords: accepts-invalid
Depends on:
Blocks:
 
Reported: 2003-07-28 21:34 UTC by dgregor
Modified: 2004-01-11 01:39 UTC (History)
2 users (show)

See Also:
Host: powerpc-apple-darwin6.6
Target:
Build: powerpc-apple-darwin6.6
Known to work:
Known to fail:
Last reconfirmed: 2003-12-18 18:10:52


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description dgregor 2003-07-28 21:34:30 UTC
The following program should not compile, because 'A' is being redeclared in namespace foo via 
the using declaration (it has already been declared differently in namespace foo):

namespace foo {
  template<typename T>
  struct A {};
}

namespace bar {
  template<typename T>
  struct A {};
}

namespace foo {
  using bar::A;
}
Comment 1 Andrew Pinski 2003-07-28 22:17:04 UTC
I can confirm this on the mainline (20030728) and 3.3.1 (20030707).

From Phil's regression hunter: Search converges between 2003-03-11-trunk (#242) and 2003-
03-12-trunk (#243).
: Search converges between 2003-03-10-3.3 (#76) and 2003-03-12-3.3 (#77).

So it was caused by something that went on both the 3.3 branch and the mainline during though 
days.
Comment 2 janis187 2003-07-30 17:09:12 UTC
The regression in PR 11697 was introduced or exposed by this patch:

--- gcc/gcc/cp/ChangeLog ---

2003-03-11  Mark Mitchell  <mark@codesourcery.com>

        PR c++/9336
        * decl2.c (do_nonmember_using_decl): Do not call duplicate decls
        to merge old and new declarations.

The regression hunt was done on i686-pc-linux-gnu using the submitter's
test case with no special options.
Comment 4 Mark Mitchell 2003-08-01 18:50:22 UTC
Fixed in GCC 3.4.
Comment 5 Andrew Pinski 2003-08-01 19:23:04 UTC
This is a 3.3.1 regression with respect to 3.3 so reopening as 3.3.1 is not fixed yet.
Comment 6 Mark Mitchell 2003-08-03 16:00:06 UTC
Postponed until GCC 3.3.2; this is only an accepts-invalid.
Comment 7 Mark Mitchell 2003-10-16 09:25:08 UTC
Postponed until GCC 3.3.3.
Comment 8 Andrew Pinski 2004-01-11 01:39:01 UTC
Will not be fixed for 3.3.3.