public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/18681] New: template friend declaration not recognized
@ 2004-11-26 13:52 wolfgang dot roehrl at de dot gi-de dot com
  2004-11-26 15:34 ` [Bug c++/18681] " pinskia at gcc dot gnu dot org
                   ` (25 more replies)
  0 siblings, 26 replies; 27+ messages in thread
From: wolfgang dot roehrl at de dot gi-de dot com @ 2004-11-26 13:52 UTC (permalink / raw)
  To: gcc-bugs

Dear all,

I would like to post a fault report for the GNU C/C++ compiler 3.3-e500.

We use the compiler to generate code for a PowerPC processor.

Used invokation line for the GNU C++ compiler:

ccppc -c -x c++ -ansi -Wall -Werror -mcpu=8540 -fverbose-asm -mbig
      -fmerge-templates -mmultiple -mno-string -mstrict-align -O3
      -fno-exceptions -fno-rtti -fno-builtin-printf
      -I<different include paths>
      -D<differen #define's>
      K.CPP -oK.O



// example program

template <typename> class C1;
template <typename> class C2;

template <typename T_>
class C2<T_*>
{
    typedef T_* T_PAR_TYPE;        <---- k.CPP, line 7
    friend class C1<T_*>;          <---- class C1<int (*)[20]> is a friend
};

template <typename T_>
class C1
{
//public:                          <---- k.CPP, line 14
    typedef typename C2<T_>::T_PAR_TYPE T_PAR;
    struct S1
    {
        T_PAR par;                 <---- k.CPP, line 18
    };

    static void fx (S1&);

public:
    void f (T_PAR ptr);
};


template <typename T_>
void C1<T_>::f (T_PAR ptr_)
{
    S1 s1;                         <---- k.CPP, line 31

    fx (s1);
}



typedef int T_MEM[20];


void f (T_MEM* p1)
{
    C1<T_MEM*> c1;

    c1.f (p1);                     <---- k.CPP, line 45
}



The compiler gives the following error messages:

k.CPP: In instantiation of `C1<int (*)[20]>::S1':
k.CPP:31:   instantiated from `void C1<<anonymous template type parameter> >::f
(typename C2<<anonymous template type parameter> >::T_PAR_TYPE) [with T_ = int 
(*)[20]]'
k.CPP:45:   instantiated from here
k.CPP:7: error: `typedef int (*C2<int (*)[20]>::T_PAR_TYPE)[20]' is private
k.CPP:18: error: within this context


The error messages remain the same if line 14 is un-commented. This seems OK
since the access specification of C1<>::T_PAR should not affect C1<>::S1. The
compiler translates only without complaints if C2<>::T_PAR_TYPE is made public.



With kind regards
W. Roehrl

-- 
           Summary: template friend declaration not recognized
           Product: gcc
           Version: 3.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: wolfgang dot roehrl at de dot gi-de dot com
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: sparc-sun-solaris2.5.1
  GCC host triplet: i386-pc-mingw32
GCC target triplet: powerpc-wrs-vxworks


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


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

* [Bug c++/18681] template friend declaration not recognized
  2004-11-26 13:52 [Bug c++/18681] New: template friend declaration not recognized wolfgang dot roehrl at de dot gi-de dot com
@ 2004-11-26 15:34 ` pinskia at gcc dot gnu dot org
  2004-11-26 16:31 ` [Bug c++/18681] [3.3/3.4/4.0 regression] " lerdsuwa at gcc dot gnu dot org
                   ` (24 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-11-26 15:34 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-11-26 15:33 -------


*** This bug has been marked as a duplicate of 950 ***

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |DUPLICATE


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


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

* [Bug c++/18681] [3.3/3.4/4.0 regression] template friend declaration not recognized
  2004-11-26 13:52 [Bug c++/18681] New: template friend declaration not recognized wolfgang dot roehrl at de dot gi-de dot com
  2004-11-26 15:34 ` [Bug c++/18681] " pinskia at gcc dot gnu dot org
@ 2004-11-26 16:31 ` lerdsuwa at gcc dot gnu dot org
  2004-11-26 16:31 ` lerdsuwa at gcc dot gnu dot org
                   ` (23 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: lerdsuwa at gcc dot gnu dot org @ 2004-11-26 16:31 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From lerdsuwa at gcc dot gnu dot org  2004-11-26 16:30 -------
Hmm.  This code uses pointer to array, not pointer to 
member as in PR c++/950.  It's also a regression from GCC 3.2.x
but we didn't actually do access checking in templates in those
earlier versions.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |UNCONFIRMED
         Resolution|DUPLICATE                   |
            Summary|template friend declaration |[3.3/3.4/4.0 regression]
                   |not recognized              |template friend declaration
                   |                            |not recognized


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


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

* [Bug c++/18681] [3.3/3.4/4.0 regression] template friend declaration not recognized
  2004-11-26 13:52 [Bug c++/18681] New: template friend declaration not recognized wolfgang dot roehrl at de dot gi-de dot com
  2004-11-26 15:34 ` [Bug c++/18681] " pinskia at gcc dot gnu dot org
  2004-11-26 16:31 ` [Bug c++/18681] [3.3/3.4/4.0 regression] " lerdsuwa at gcc dot gnu dot org
@ 2004-11-26 16:31 ` lerdsuwa at gcc dot gnu dot org
  2004-11-26 16:34 ` pinskia at gcc dot gnu dot org
                   ` (22 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: lerdsuwa at gcc dot gnu dot org @ 2004-11-26 16:31 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From lerdsuwa at gcc dot gnu dot org  2004-11-26 16:31 -------
Confirmed as a bug, likely unrelated to PR950.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2004-11-26 16:31:41
               date|                            |


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


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

* [Bug c++/18681] [3.3/3.4/4.0 regression] template friend declaration not recognized
  2004-11-26 13:52 [Bug c++/18681] New: template friend declaration not recognized wolfgang dot roehrl at de dot gi-de dot com
                   ` (2 preceding siblings ...)
  2004-11-26 16:31 ` lerdsuwa at gcc dot gnu dot org
@ 2004-11-26 16:34 ` pinskia at gcc dot gnu dot org
  2004-11-26 22:45 ` giovannibajo at libero dot it
                   ` (21 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-11-26 16:34 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-11-26 16:34 -------
But likely related to PR 2892 (that was the one which I had ment to mark as a dup to).

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
  BugsThisDependsOn|                            |2892


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


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

* [Bug c++/18681] [3.3/3.4/4.0 regression] template friend declaration not recognized
  2004-11-26 13:52 [Bug c++/18681] New: template friend declaration not recognized wolfgang dot roehrl at de dot gi-de dot com
                   ` (3 preceding siblings ...)
  2004-11-26 16:34 ` pinskia at gcc dot gnu dot org
@ 2004-11-26 22:45 ` giovannibajo at libero dot it
  2004-11-26 23:11 ` pinskia at gcc dot gnu dot org
                   ` (20 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: giovannibajo at libero dot it @ 2004-11-26 22:45 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |3.3.6


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


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

* [Bug c++/18681] [3.3/3.4/4.0 regression] template friend declaration not recognized
  2004-11-26 13:52 [Bug c++/18681] New: template friend declaration not recognized wolfgang dot roehrl at de dot gi-de dot com
                   ` (4 preceding siblings ...)
  2004-11-26 22:45 ` giovannibajo at libero dot it
@ 2004-11-26 23:11 ` pinskia at gcc dot gnu dot org
  2004-11-27 15:53 ` lerdsuwa at gcc dot gnu dot org
                   ` (19 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-11-26 23:11 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pinskia at gcc dot gnu dot
                   |                            |org
           Keywords|                            |rejects-valid
   Target Milestone|3.3.6                       |3.4.4


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


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

* [Bug c++/18681] [3.3/3.4/4.0 regression] template friend declaration not recognized
  2004-11-26 13:52 [Bug c++/18681] New: template friend declaration not recognized wolfgang dot roehrl at de dot gi-de dot com
                   ` (5 preceding siblings ...)
  2004-11-26 23:11 ` pinskia at gcc dot gnu dot org
@ 2004-11-27 15:53 ` lerdsuwa at gcc dot gnu dot org
  2004-11-27 16:13 ` lerdsuwa at gcc dot gnu dot org
                   ` (18 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: lerdsuwa at gcc dot gnu dot org @ 2004-11-27 15:53 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From lerdsuwa at gcc dot gnu dot org  2004-11-27 15:53 -------
Under investigate.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |lerdsuwa at gcc dot gnu dot
                   |dot org                     |org
             Status|NEW                         |ASSIGNED


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


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

* [Bug c++/18681] [3.3/3.4/4.0 regression] template friend declaration not recognized
  2004-11-26 13:52 [Bug c++/18681] New: template friend declaration not recognized wolfgang dot roehrl at de dot gi-de dot com
                   ` (6 preceding siblings ...)
  2004-11-27 15:53 ` lerdsuwa at gcc dot gnu dot org
@ 2004-11-27 16:13 ` lerdsuwa at gcc dot gnu dot org
  2004-11-27 16:20 ` [Bug c++/18681] " lerdsuwa at gcc dot gnu dot org
                   ` (17 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: lerdsuwa at gcc dot gnu dot org @ 2004-11-27 16:13 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From lerdsuwa at gcc dot gnu dot org  2004-11-27 16:12 -------
Not a bug.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|lerdsuwa at gcc dot gnu dot |unassigned at gcc dot gnu
                   |org                         |dot org
             Status|ASSIGNED                    |NEW
   Target Milestone|3.4.4                       |---


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


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

* [Bug c++/18681] template friend declaration not recognized
  2004-11-26 13:52 [Bug c++/18681] New: template friend declaration not recognized wolfgang dot roehrl at de dot gi-de dot com
                   ` (7 preceding siblings ...)
  2004-11-27 16:13 ` lerdsuwa at gcc dot gnu dot org
@ 2004-11-27 16:20 ` lerdsuwa at gcc dot gnu dot org
  2004-11-29  7:12 ` wolfgang dot roehrl at de dot gi-de dot com
                   ` (16 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: lerdsuwa at gcc dot gnu dot org @ 2004-11-27 16:20 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From lerdsuwa at gcc dot gnu dot org  2004-11-27 16:19 -------
Not a bug.  You are using TPAR inside the class C1<T>::S,
however, only C1<T> is a friend of C2.  This is the relevent section
of C++ standard (section 11.4 paragraph 2):

  ... the declarations of members of classes nested within
  the friend class cannot access the names of private and
  protected members from the class granting friendship. ...

and the example in the same section:

  class A {
    class B {};
    friend class X;
  };
  class X : A::B {   // ill-formed: A::B cannot be accessed
                     // in the base-clause for X
    A::B mx;         // OK: A::B used to declare member of X
    class Y : A::B { // OK: A::B used to declare member of X
      A::B my;       // ill-formed: A::B cannot be accessed
                     // to declare members of nested class of X
    };
  };


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID
            Summary|[3.3/3.4/4.0 regression]    |template friend declaration
                   |template friend declaration |not recognized
                   |not recognized              |


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


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

* [Bug c++/18681] template friend declaration not recognized
  2004-11-26 13:52 [Bug c++/18681] New: template friend declaration not recognized wolfgang dot roehrl at de dot gi-de dot com
                   ` (8 preceding siblings ...)
  2004-11-27 16:20 ` [Bug c++/18681] " lerdsuwa at gcc dot gnu dot org
@ 2004-11-29  7:12 ` wolfgang dot roehrl at de dot gi-de dot com
  2004-11-29 11:34 ` giovannibajo at libero dot it
                   ` (15 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: wolfgang dot roehrl at de dot gi-de dot com @ 2004-11-29  7:12 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From wolfgang dot roehrl at de dot gi-de dot com  2004-11-29 07:12 -------
Subject: Antwort:  template friend declaration not recognized





Hi all,

I'm responding to the "Comments From lerdsuwa at gcc dot gnu dot org
2004-11-27 16:19":

I do not think that the cited standard rule (11.4/2) matches my example
because the nested class C1<T_>::S1 uses a name of its surrounding class -
namely C1<T_>::T_PAR. For the definition of this name class C1<T_> in turn
is referring to a name of class C2<T_*> - namely C2<T_*>::T_PAR_TYPE. And
class C2<T_*> grants class C1<T_> access to its private names.


Best regards,
W. Roehrl



-- 


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


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

* [Bug c++/18681] template friend declaration not recognized
  2004-11-26 13:52 [Bug c++/18681] New: template friend declaration not recognized wolfgang dot roehrl at de dot gi-de dot com
                   ` (9 preceding siblings ...)
  2004-11-29  7:12 ` wolfgang dot roehrl at de dot gi-de dot com
@ 2004-11-29 11:34 ` giovannibajo at libero dot it
  2004-11-29 14:00 ` lerdsuwa at gcc dot gnu dot org
                   ` (14 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: giovannibajo at libero dot it @ 2004-11-29 11:34 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From giovannibajo at libero dot it  2004-11-29 11:34 -------
adding Kriang to CC so that he does not miss the comment.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |lerdsuwa at gcc dot gnu dot
                   |                            |org


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


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

* [Bug c++/18681] template friend declaration not recognized
  2004-11-26 13:52 [Bug c++/18681] New: template friend declaration not recognized wolfgang dot roehrl at de dot gi-de dot com
                   ` (10 preceding siblings ...)
  2004-11-29 11:34 ` giovannibajo at libero dot it
@ 2004-11-29 14:00 ` lerdsuwa at gcc dot gnu dot org
  2004-11-29 14:01 ` lerdsuwa at gcc dot gnu dot org
                   ` (13 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: lerdsuwa at gcc dot gnu dot org @ 2004-11-29 14:00 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From lerdsuwa at gcc dot gnu dot org  2004-11-29 14:00 -------
OK, sorry for the mistake.  I'll look at it again.

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


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


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

* [Bug c++/18681] template friend declaration not recognized
  2004-11-26 13:52 [Bug c++/18681] New: template friend declaration not recognized wolfgang dot roehrl at de dot gi-de dot com
                   ` (11 preceding siblings ...)
  2004-11-29 14:00 ` lerdsuwa at gcc dot gnu dot org
@ 2004-11-29 14:01 ` lerdsuwa at gcc dot gnu dot org
  2004-11-29 14:11 ` [Bug c++/18681] [3.3/3.4/4.0 Regression] " lerdsuwa at gcc dot gnu dot org
                   ` (12 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: lerdsuwa at gcc dot gnu dot org @ 2004-11-29 14:01 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |lerdsuwa at gcc dot gnu dot
                   |dot org                     |org
             Status|REOPENED                    |ASSIGNED


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


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

* [Bug c++/18681] [3.3/3.4/4.0 Regression] template friend declaration not recognized
  2004-11-26 13:52 [Bug c++/18681] New: template friend declaration not recognized wolfgang dot roehrl at de dot gi-de dot com
                   ` (12 preceding siblings ...)
  2004-11-29 14:01 ` lerdsuwa at gcc dot gnu dot org
@ 2004-11-29 14:11 ` lerdsuwa at gcc dot gnu dot org
  2004-11-30 15:02 ` lerdsuwa at gcc dot gnu dot org
                   ` (11 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: lerdsuwa at gcc dot gnu dot org @ 2004-11-29 14:11 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|template friend declaration |[3.3/3.4/4.0 Regression]
                   |not recognized              |template friend declaration
                   |                            |not recognized
   Target Milestone|---                         |3.4.4


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


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

* [Bug c++/18681] [3.3/3.4/4.0 Regression] template friend declaration not recognized
  2004-11-26 13:52 [Bug c++/18681] New: template friend declaration not recognized wolfgang dot roehrl at de dot gi-de dot com
                   ` (13 preceding siblings ...)
  2004-11-29 14:11 ` [Bug c++/18681] [3.3/3.4/4.0 Regression] " lerdsuwa at gcc dot gnu dot org
@ 2004-11-30 15:02 ` lerdsuwa at gcc dot gnu dot org
  2004-12-02 12:05 ` lerdsuwa at gcc dot gnu dot org
                   ` (10 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: lerdsuwa at gcc dot gnu dot org @ 2004-11-30 15:02 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From lerdsuwa at gcc dot gnu dot org  2004-11-30 15:01 -------
The problem is GCC cannot distinguish between case #1 and #2
in the code below.

template <typename T_>
class C1
{
    typedef typename C2<T_>::T_PAR_TYPE T_PAR;
    struct S1
    {
        T_PAR par1;                       // #1
        typename C2<T_>::T_PAR_TYPE par2; // #2
    };
    ...
};


-- 


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


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

* [Bug c++/18681] [3.3/3.4/4.0 Regression] template friend declaration not recognized
  2004-11-26 13:52 [Bug c++/18681] New: template friend declaration not recognized wolfgang dot roehrl at de dot gi-de dot com
                   ` (14 preceding siblings ...)
  2004-11-30 15:02 ` lerdsuwa at gcc dot gnu dot org
@ 2004-12-02 12:05 ` lerdsuwa at gcc dot gnu dot org
  2004-12-12 12:39 ` lerdsuwa at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: lerdsuwa at gcc dot gnu dot org @ 2004-12-02 12:05 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From lerdsuwa at gcc dot gnu dot org  2004-12-02 12:05 -------
Patch in progress.

-- 


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


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

* [Bug c++/18681] [3.3/3.4/4.0 Regression] template friend declaration not recognized
  2004-11-26 13:52 [Bug c++/18681] New: template friend declaration not recognized wolfgang dot roehrl at de dot gi-de dot com
                   ` (15 preceding siblings ...)
  2004-12-02 12:05 ` lerdsuwa at gcc dot gnu dot org
@ 2004-12-12 12:39 ` lerdsuwa at gcc dot gnu dot org
  2004-12-13 14:19 ` lerdsuwa at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: lerdsuwa at gcc dot gnu dot org @ 2004-12-12 12:39 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From lerdsuwa at gcc dot gnu dot org  2004-12-12 12:39 -------
Patches partially fix this bug are submitted:
(for 4.0)
  http://gcc.gnu.org/ml/gcc-patches/2004-12/msg00854.html
(for 3.4.4)
  http://gcc.gnu.org/ml/gcc-patches/2004-12/msg00855.html

This should cover most likely failures, including the provided
testcase.  Some obscure cases still fail and these require the 
next set of patches.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |patch


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


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

* [Bug c++/18681] [3.3/3.4/4.0 Regression] template friend declaration not recognized
  2004-11-26 13:52 [Bug c++/18681] New: template friend declaration not recognized wolfgang dot roehrl at de dot gi-de dot com
                   ` (16 preceding siblings ...)
  2004-12-12 12:39 ` lerdsuwa at gcc dot gnu dot org
@ 2004-12-13 14:19 ` lerdsuwa at gcc dot gnu dot org
  2004-12-21 15:50 ` lerdsuwa at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: lerdsuwa at gcc dot gnu dot org @ 2004-12-13 14:19 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From lerdsuwa at gcc dot gnu dot org  2004-12-13 14:18 -------
Patches are withdrawn.  They fail to deal with some more complex cases
and the approach used has to be overhauled.

-- 


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


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

* [Bug c++/18681] [3.3/3.4/4.0 Regression] template friend declaration not recognized
  2004-11-26 13:52 [Bug c++/18681] New: template friend declaration not recognized wolfgang dot roehrl at de dot gi-de dot com
                   ` (17 preceding siblings ...)
  2004-12-13 14:19 ` lerdsuwa at gcc dot gnu dot org
@ 2004-12-21 15:50 ` lerdsuwa at gcc dot gnu dot org
  2005-03-16 13:17 ` [Bug c++/18681] [3.3/3.4/4.0/4.1 " reichelt at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: lerdsuwa at gcc dot gnu dot org @ 2004-12-21 15:50 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From lerdsuwa at gcc dot gnu dot org  2004-12-21 15:50 -------
Revised patch for 4.0 posted:
  http://gcc.gnu.org/ml/gcc-patches/2004-12/msg01634.html

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |patch


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


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

* [Bug c++/18681] [3.3/3.4/4.0/4.1 Regression] template friend declaration not recognized
  2004-11-26 13:52 [Bug c++/18681] New: template friend declaration not recognized wolfgang dot roehrl at de dot gi-de dot com
                   ` (18 preceding siblings ...)
  2004-12-21 15:50 ` lerdsuwa at gcc dot gnu dot org
@ 2005-03-16 13:17 ` reichelt at gcc dot gnu dot org
  2005-04-17  4:10 ` mmitchel at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2005-03-16 13:17 UTC (permalink / raw)
  To: gcc-bugs



-- 
Bug 18681 depends on bug 2892, which changed state.

Bug 2892 Summary: No array-to-pointer decay happens for template functions
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=2892

           What    |Old Value                   |New Value
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

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


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

* [Bug c++/18681] [3.3/3.4/4.0/4.1 Regression] template friend declaration not recognized
  2004-11-26 13:52 [Bug c++/18681] New: template friend declaration not recognized wolfgang dot roehrl at de dot gi-de dot com
                   ` (19 preceding siblings ...)
  2005-03-16 13:17 ` [Bug c++/18681] [3.3/3.4/4.0/4.1 " reichelt at gcc dot gnu dot org
@ 2005-04-17  4:10 ` mmitchel at gcc dot gnu dot org
  2005-04-23 15:28 ` lerdsuwa at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2005-04-17  4:10 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From mmitchel at gcc dot gnu dot org  2005-04-17 04:10 -------
The TYPE_NO_ACCESS_CHECK_P sets off a red flag for me; that suggests that we're
at some point doing access checks directly on _TYPE nodes rather than _DECL
nodes.  If so, that's wrong; only declarations have access associated with them.

-- 


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


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

* [Bug c++/18681] [3.3/3.4/4.0/4.1 Regression] template friend declaration not recognized
  2004-11-26 13:52 [Bug c++/18681] New: template friend declaration not recognized wolfgang dot roehrl at de dot gi-de dot com
                   ` (20 preceding siblings ...)
  2005-04-17  4:10 ` mmitchel at gcc dot gnu dot org
@ 2005-04-23 15:28 ` lerdsuwa at gcc dot gnu dot org
  2005-05-19 17:08 ` lerdsuwa at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: lerdsuwa at gcc dot gnu dot org @ 2005-04-23 15:28 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From lerdsuwa at gcc dot gnu dot org  2005-04-23 15:28 -------
The TYPE_NO_ACCESS_CHECK_P is there because we check
access on each tsubst TYPENAME_TYPE, regardless whether
the typename is actually appear in the code or it come from a typedef.
The patch was only intended for 4.0.  For mainline, I am working on
the approach I mention as a stage 2 project.  Still need some more time
to finish it.


-- 


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


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

* [Bug c++/18681] [3.3/3.4/4.0/4.1 Regression] template friend declaration not recognized
  2004-11-26 13:52 [Bug c++/18681] New: template friend declaration not recognized wolfgang dot roehrl at de dot gi-de dot com
                   ` (21 preceding siblings ...)
  2005-04-23 15:28 ` lerdsuwa at gcc dot gnu dot org
@ 2005-05-19 17:08 ` lerdsuwa at gcc dot gnu dot org
  2005-05-19 17:44 ` mmitchel at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: lerdsuwa at gcc dot gnu dot org @ 2005-05-19 17:08 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From lerdsuwa at gcc dot gnu dot org  2005-05-19 17:07 -------
Patch using new approach for 4.1:
  http://gcc.gnu.org/ml/gcc-patches/2005-05/msg01992.html
(Note this is part 4 in a series, earlier parts are also required)

-- 


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


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

* [Bug c++/18681] [3.3/3.4/4.0/4.1 Regression] template friend declaration not recognized
  2004-11-26 13:52 [Bug c++/18681] New: template friend declaration not recognized wolfgang dot roehrl at de dot gi-de dot com
                   ` (22 preceding siblings ...)
  2005-05-19 17:08 ` lerdsuwa at gcc dot gnu dot org
@ 2005-05-19 17:44 ` mmitchel at gcc dot gnu dot org
  2005-06-07 14:58 ` [Bug c++/18681] [3.4/4.0/4.1 " lerdsuwa at gcc dot gnu dot org
  2005-07-06 17:04 ` mmitchel at gcc dot gnu dot org
  25 siblings, 0 replies; 27+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2005-05-19 17:44 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|3.4.4                       |3.4.5


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


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

* [Bug c++/18681] [3.4/4.0/4.1 Regression] template friend declaration not recognized
  2004-11-26 13:52 [Bug c++/18681] New: template friend declaration not recognized wolfgang dot roehrl at de dot gi-de dot com
                   ` (23 preceding siblings ...)
  2005-05-19 17:44 ` mmitchel at gcc dot gnu dot org
@ 2005-06-07 14:58 ` lerdsuwa at gcc dot gnu dot org
  2005-07-06 17:04 ` mmitchel at gcc dot gnu dot org
  25 siblings, 0 replies; 27+ messages in thread
From: lerdsuwa at gcc dot gnu dot org @ 2005-06-07 14:58 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From lerdsuwa at gcc dot gnu dot org  2005-06-07 14:57 -------
Patch withdrawn due to overlooking default function argument and default
template argument. No nice solution is found yet.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|lerdsuwa at gcc dot gnu dot |unassigned at gcc dot gnu
                   |org                         |dot org
             Status|ASSIGNED                    |NEW
           Keywords|patch                       |


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


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

* [Bug c++/18681] [3.4/4.0/4.1 Regression] template friend declaration not recognized
  2004-11-26 13:52 [Bug c++/18681] New: template friend declaration not recognized wolfgang dot roehrl at de dot gi-de dot com
                   ` (24 preceding siblings ...)
  2005-06-07 14:58 ` [Bug c++/18681] [3.4/4.0/4.1 " lerdsuwa at gcc dot gnu dot org
@ 2005-07-06 17:04 ` mmitchel at gcc dot gnu dot org
  25 siblings, 0 replies; 27+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2005-07-06 17:04 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From mmitchel at gcc dot gnu dot org  2005-07-06 17:03 -------
Postponed until 4.0.2.

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


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


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

end of thread, other threads:[~2005-07-06 17:03 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-11-26 13:52 [Bug c++/18681] New: template friend declaration not recognized wolfgang dot roehrl at de dot gi-de dot com
2004-11-26 15:34 ` [Bug c++/18681] " pinskia at gcc dot gnu dot org
2004-11-26 16:31 ` [Bug c++/18681] [3.3/3.4/4.0 regression] " lerdsuwa at gcc dot gnu dot org
2004-11-26 16:31 ` lerdsuwa at gcc dot gnu dot org
2004-11-26 16:34 ` pinskia at gcc dot gnu dot org
2004-11-26 22:45 ` giovannibajo at libero dot it
2004-11-26 23:11 ` pinskia at gcc dot gnu dot org
2004-11-27 15:53 ` lerdsuwa at gcc dot gnu dot org
2004-11-27 16:13 ` lerdsuwa at gcc dot gnu dot org
2004-11-27 16:20 ` [Bug c++/18681] " lerdsuwa at gcc dot gnu dot org
2004-11-29  7:12 ` wolfgang dot roehrl at de dot gi-de dot com
2004-11-29 11:34 ` giovannibajo at libero dot it
2004-11-29 14:00 ` lerdsuwa at gcc dot gnu dot org
2004-11-29 14:01 ` lerdsuwa at gcc dot gnu dot org
2004-11-29 14:11 ` [Bug c++/18681] [3.3/3.4/4.0 Regression] " lerdsuwa at gcc dot gnu dot org
2004-11-30 15:02 ` lerdsuwa at gcc dot gnu dot org
2004-12-02 12:05 ` lerdsuwa at gcc dot gnu dot org
2004-12-12 12:39 ` lerdsuwa at gcc dot gnu dot org
2004-12-13 14:19 ` lerdsuwa at gcc dot gnu dot org
2004-12-21 15:50 ` lerdsuwa at gcc dot gnu dot org
2005-03-16 13:17 ` [Bug c++/18681] [3.3/3.4/4.0/4.1 " reichelt at gcc dot gnu dot org
2005-04-17  4:10 ` mmitchel at gcc dot gnu dot org
2005-04-23 15:28 ` lerdsuwa at gcc dot gnu dot org
2005-05-19 17:08 ` lerdsuwa at gcc dot gnu dot org
2005-05-19 17:44 ` mmitchel at gcc dot gnu dot org
2005-06-07 14:58 ` [Bug c++/18681] [3.4/4.0/4.1 " lerdsuwa at gcc dot gnu dot org
2005-07-06 17:04 ` mmitchel at gcc dot gnu dot 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).