public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/23211] New: using dec in nested class doesn't import name
@ 2005-08-03  0:22 igodard at pacbell dot net
  2005-08-03  0:34 ` [Bug c++/23211] " pinskia at gcc dot gnu dot org
                   ` (5 more replies)
  0 siblings, 6 replies; 12+ messages in thread
From: igodard at pacbell dot net @ 2005-08-03  0:22 UTC (permalink / raw)
  To: gcc-bugs

template<typename T>
struct  foo {
    typedef int itype;
    typedef int jtype;
    struct bar {
        typedef typename foo::itype itype;
        using foo::jtype;
        itype i;
        jtype j;
        };
    };

gets you:
~/ootbc/members/src$ g++ foo.cc
foo.cc:9: error: `jtype' does not name a type

Adding "typename" here and there changes the error you get but doesn't compile.
The above code compiles OK on Comeau.

-- 
           Summary: using dec in nested class doesn't import name
           Product: gcc
           Version: 3.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: igodard at pacbell dot net
                CC: gcc-bugs at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23211


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug c++/23211] using dec in nested class doesn't import name
  2005-08-03  0:22 [Bug c++/23211] New: using dec in nested class doesn't import name igodard at pacbell dot net
@ 2005-08-03  0:34 ` pinskia at gcc dot gnu dot org
  2005-09-14 15:29 ` [Bug c++/23211] [3.4/4.0/4.1 regression] " bangerth at dealii dot org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-08-03  0:34 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-08-03 00:34 -------
I think this is a dup of bug 14258.  GCC still implements the old using rules.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23211


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug c++/23211] [3.4/4.0/4.1 regression] using dec in nested class doesn't import name
  2005-08-03  0:22 [Bug c++/23211] New: using dec in nested class doesn't import name igodard at pacbell dot net
  2005-08-03  0:34 ` [Bug c++/23211] " pinskia at gcc dot gnu dot org
@ 2005-09-14 15:29 ` bangerth at dealii dot org
  2005-09-14 15:35 ` pinskia at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 12+ messages in thread
From: bangerth at dealii dot org @ 2005-09-14 15:29 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From bangerth at dealii dot org  2005-09-14 15:28 -------
Confirmed. This is a regression against 3.3 which compiled the code 
just fine. 
 
W. 

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
           Keywords|                            |rejects-valid
      Known to fail|                            |3.4.5 4.0.2 4.1.0
      Known to work|                            |3.3.4
   Last reconfirmed|0000-00-00 00:00:00         |2005-09-14 15:28:35
               date|                            |
            Summary|using dec in nested class   |[3.4/4.0/4.1 regression]
                   |doesn't import name         |using dec in nested class
                   |                            |doesn't import name
   Target Milestone|---                         |4.0.3


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23211


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug c++/23211] [3.4/4.0/4.1 regression] using dec in nested class doesn't import name
  2005-08-03  0:22 [Bug c++/23211] New: using dec in nested class doesn't import name igodard at pacbell dot net
  2005-08-03  0:34 ` [Bug c++/23211] " pinskia at gcc dot gnu dot org
  2005-09-14 15:29 ` [Bug c++/23211] [3.4/4.0/4.1 regression] " bangerth at dealii dot org
@ 2005-09-14 15:35 ` pinskia at gcc dot gnu dot org
  2005-09-14 15:47 ` pinskia at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-09-14 15:35 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-09-14 15:34 -------
As I said, I think this is a dup of bug 14258, we never really got using correct.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
  BugsThisDependsOn|                            |14258


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23211


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug c++/23211] [3.4/4.0/4.1 regression] using dec in nested class doesn't import name
  2005-08-03  0:22 [Bug c++/23211] New: using dec in nested class doesn't import name igodard at pacbell dot net
                   ` (2 preceding siblings ...)
  2005-09-14 15:35 ` pinskia at gcc dot gnu dot org
@ 2005-09-14 15:47 ` pinskia at gcc dot gnu dot org
  2005-09-14 18:07 ` bangerth at dealii dot org
  2005-09-27 16:17 ` mmitchel at gcc dot gnu dot org
  5 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-09-14 15:47 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.0.3                       |4.0.2


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23211


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug c++/23211] [3.4/4.0/4.1 regression] using dec in nested class doesn't import name
  2005-08-03  0:22 [Bug c++/23211] New: using dec in nested class doesn't import name igodard at pacbell dot net
                   ` (3 preceding siblings ...)
  2005-09-14 15:47 ` pinskia at gcc dot gnu dot org
@ 2005-09-14 18:07 ` bangerth at dealii dot org
  2005-09-27 16:17 ` mmitchel at gcc dot gnu dot org
  5 siblings, 0 replies; 12+ messages in thread
From: bangerth at dealii dot org @ 2005-09-14 18:07 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From bangerth at dealii dot org  2005-09-14 18:07 -------
I'm not sure it is a duplicate, since the error messages are very 
different. But be that as it may, this is a regression and should 
be fixed. If it is, someone may want to take a look at that other 
PR as well. 
 
W. 

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23211


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug c++/23211] [3.4/4.0/4.1 regression] using dec in nested class doesn't import name
  2005-08-03  0:22 [Bug c++/23211] New: using dec in nested class doesn't import name igodard at pacbell dot net
                   ` (4 preceding siblings ...)
  2005-09-14 18:07 ` bangerth at dealii dot org
@ 2005-09-27 16:17 ` mmitchel at gcc dot gnu dot org
  5 siblings, 0 replies; 12+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2005-09-27 16:17 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.0.2                       |4.0.3


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23211


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug c++/23211] using dec in nested class doesn't import name
       [not found] <bug-23211-4@http.gcc.gnu.org/bugzilla/>
  2011-12-28 20:04 ` fabien at gcc dot gnu.org
  2011-12-28 20:10 ` fabien at gcc dot gnu.org
@ 2012-01-03  9:59 ` fabien at gcc dot gnu.org
  2 siblings, 0 replies; 12+ messages in thread
From: fabien at gcc dot gnu.org @ 2012-01-03  9:59 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23211

fabien at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.7.0


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug c++/23211] using dec in nested class doesn't import name
       [not found] <bug-23211-4@http.gcc.gnu.org/bugzilla/>
  2011-12-28 20:04 ` fabien at gcc dot gnu.org
@ 2011-12-28 20:10 ` fabien at gcc dot gnu.org
  2012-01-03  9:59 ` fabien at gcc dot gnu.org
  2 siblings, 0 replies; 12+ messages in thread
From: fabien at gcc dot gnu.org @ 2011-12-28 20:10 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23211

fabien at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|                            |FIXED

--- Comment #16 from fabien at gcc dot gnu.org 2011-12-28 20:04:25 UTC ---
Fixed.


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug c++/23211] using dec in nested class doesn't import name
       [not found] <bug-23211-4@http.gcc.gnu.org/bugzilla/>
@ 2011-12-28 20:04 ` fabien at gcc dot gnu.org
  2011-12-28 20:10 ` fabien at gcc dot gnu.org
  2012-01-03  9:59 ` fabien at gcc dot gnu.org
  2 siblings, 0 replies; 12+ messages in thread
From: fabien at gcc dot gnu.org @ 2011-12-28 20:04 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23211

--- Comment #15 from fabien at gcc dot gnu.org 2011-12-28 19:53:19 UTC ---
Author: fabien
Date: Wed Dec 28 19:53:14 2011
New Revision: 182711

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=182711
Log:
gcc/testsuite/ChangeLog

2011-12-28  Fabien Chene  <fabien@gcc.gnu.org>

    PR c++/23211
    * g++.dg/template/using18.C: New.
    * g++.dg/template/using19.C: New.
    * g++.dg/template/nested3.C: Remove dg-message at instantiation.
    * g++.dg/template/crash13.C: Likewise.

gcc/cp/ChangeLog

2011-12-28  Fabien Chene  <fabien@gcc.gnu.org>

    PR c++/23211
    * name-lookup.c (do_class_using_decl): Use dependent_scope_p
    instead of dependent_type_p, to check that a non-dependent
    nested-name-specifier of a class-scope using declaration refers to
    a base, even if the current scope is dependent.
    * parser.c (cp_parser_using_declaration): Set
    USING_DECL_TYPENAME_P to 1 if the DECL is not null. Re-indent a
    'else' close to the prior modification.


Added:
    trunk/gcc/testsuite/g++.dg/template/using18.C
    trunk/gcc/testsuite/g++.dg/template/using19.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/name-lookup.c
    trunk/gcc/cp/parser.c
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/g++.dg/template/crash13.C
    trunk/gcc/testsuite/g++.dg/template/nested3.C


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug c++/23211] using dec in nested class doesn't import name
       [not found] <bug-23211-6594@http.gcc.gnu.org/bugzilla/>
  2006-08-22 20:31 ` [Bug c++/23211] " pinskia at gcc dot gnu dot org
@ 2006-08-22 20:38 ` igodard at pacbell dot net
  1 sibling, 0 replies; 12+ messages in thread
From: igodard at pacbell dot net @ 2006-08-22 20:38 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #14 from igodard at pacbell dot net  2006-08-22 20:38 -------
Not, it's an error: invalid text is accepted without diagnostic (if the
identifier introduced with the "using" is not itself used, then the using
statement is invalid but gets no diagnostic).


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23211


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug c++/23211] using dec in nested class doesn't import name
       [not found] <bug-23211-6594@http.gcc.gnu.org/bugzilla/>
@ 2006-08-22 20:31 ` pinskia at gcc dot gnu dot org
  2006-08-22 20:38 ` igodard at pacbell dot net
  1 sibling, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-08-22 20:31 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #13 from pinskia at gcc dot gnu dot org  2006-08-22 20:30 -------
So this is just a diagnostic issue and not a regression.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|rejects-valid               |diagnostic
            Summary|[4.0/4.1/4.2 regression]    |using dec in nested class
                   |using dec in nested class   |doesn't import name
                   |doesn't import name         |
   Target Milestone|4.1.2                       |---


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23211


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2012-01-03  9:59 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-08-03  0:22 [Bug c++/23211] New: using dec in nested class doesn't import name igodard at pacbell dot net
2005-08-03  0:34 ` [Bug c++/23211] " pinskia at gcc dot gnu dot org
2005-09-14 15:29 ` [Bug c++/23211] [3.4/4.0/4.1 regression] " bangerth at dealii dot org
2005-09-14 15:35 ` pinskia at gcc dot gnu dot org
2005-09-14 15:47 ` pinskia at gcc dot gnu dot org
2005-09-14 18:07 ` bangerth at dealii dot org
2005-09-27 16:17 ` mmitchel at gcc dot gnu dot org
     [not found] <bug-23211-6594@http.gcc.gnu.org/bugzilla/>
2006-08-22 20:31 ` [Bug c++/23211] " pinskia at gcc dot gnu dot org
2006-08-22 20:38 ` igodard at pacbell dot net
     [not found] <bug-23211-4@http.gcc.gnu.org/bugzilla/>
2011-12-28 20:04 ` fabien at gcc dot gnu.org
2011-12-28 20:10 ` fabien at gcc dot gnu.org
2012-01-03  9:59 ` fabien at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).