public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/39987]  New: [4.3/4.4/4.5 Regression] Rejects default argument that is a template via access failure
@ 2009-05-01  0:49 pinskia at gcc dot gnu dot org
  2009-05-01  0:49 ` [Bug c++/39987] " pinskia at gcc dot gnu dot org
                   ` (14 more replies)
  0 siblings, 15 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2009-05-01  0:49 UTC (permalink / raw)
  To: gcc-bugs

Like PR 37971 but this time Find is a template member function instead of just
a member function. 
Testcase:

class foo
{
 template<typename U>
 static bool func(const U& x)
 {}
public:
 template<typename U>
 unsigned int Find(const U& x, bool (*pFunc) (const U&) = func) const
 {}
};

class bar {
 bool Initialize();
protected:
 foo b;
};

bool bar::Initialize()
{
        b.Find(b);
}


-- 
           Summary: [4.3/4.4/4.5 Regression] Rejects default argument that
                    is a template via access failure
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Keywords: rejects-valid
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: pinskia at gcc dot gnu dot org


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


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

* [Bug c++/39987] [4.3/4.4/4.5 Regression] Rejects default argument that is a template via access failure
  2009-05-01  0:49 [Bug c++/39987] New: [4.3/4.4/4.5 Regression] Rejects default argument that is a template via access failure pinskia at gcc dot gnu dot org
@ 2009-05-01  0:49 ` pinskia at gcc dot gnu dot org
  2009-05-05 15:53 ` mmitchel at gcc dot gnu dot org
                   ` (13 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2009-05-01  0:49 UTC (permalink / raw)
  To: gcc-bugs



-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to fail|                            |4.4.0 4.3.0 4.2.0
      Known to work|                            |4.1.1 4.0.2
   Target Milestone|---                         |4.5.0


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


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

* [Bug c++/39987] [4.3/4.4/4.5 Regression] Rejects default argument that is a template via access failure
  2009-05-01  0:49 [Bug c++/39987] New: [4.3/4.4/4.5 Regression] Rejects default argument that is a template via access failure pinskia at gcc dot gnu dot org
  2009-05-01  0:49 ` [Bug c++/39987] " pinskia at gcc dot gnu dot org
@ 2009-05-05 15:53 ` mmitchel at gcc dot gnu dot org
  2009-08-04 12:03 ` dodji at gcc dot gnu dot org
                   ` (12 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2009-05-05 15:53 UTC (permalink / raw)
  To: gcc-bugs



-- 

mmitchel at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P1


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


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

* [Bug c++/39987] [4.3/4.4/4.5 Regression] Rejects default argument that is a template via access failure
  2009-05-01  0:49 [Bug c++/39987] New: [4.3/4.4/4.5 Regression] Rejects default argument that is a template via access failure pinskia at gcc dot gnu dot org
  2009-05-01  0:49 ` [Bug c++/39987] " pinskia at gcc dot gnu dot org
  2009-05-05 15:53 ` mmitchel at gcc dot gnu dot org
@ 2009-08-04 12:03 ` dodji at gcc dot gnu dot org
  2009-08-04 14:21 ` dodji at gcc dot gnu dot org
                   ` (11 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: dodji at gcc dot gnu dot org @ 2009-08-04 12:03 UTC (permalink / raw)
  To: gcc-bugs



-- 

dodji at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |dodji at gcc dot gnu dot org
                   |dot org                     |
             Status|UNCONFIRMED                 |ASSIGNED
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2009-08-04 12:03:16
               date|                            |


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


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

* [Bug c++/39987] [4.3/4.4/4.5 Regression] Rejects default argument that is a template via access failure
  2009-05-01  0:49 [Bug c++/39987] New: [4.3/4.4/4.5 Regression] Rejects default argument that is a template via access failure pinskia at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2009-08-04 12:03 ` dodji at gcc dot gnu dot org
@ 2009-08-04 14:21 ` dodji at gcc dot gnu dot org
  2009-08-04 19:50 ` dodji at gcc dot gnu dot org
                   ` (10 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: dodji at gcc dot gnu dot org @ 2009-08-04 14:21 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from dodji at gcc dot gnu dot org  2009-08-04 14:21 -------
Submitted a patch to http://gcc.gnu.org/ml/gcc-patches/2009-08/msg00185.html


-- 


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


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

* [Bug c++/39987] [4.3/4.4/4.5 Regression] Rejects default argument that is a template via access failure
  2009-05-01  0:49 [Bug c++/39987] New: [4.3/4.4/4.5 Regression] Rejects default argument that is a template via access failure pinskia at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2009-08-04 14:21 ` dodji at gcc dot gnu dot org
@ 2009-08-04 19:50 ` dodji at gcc dot gnu dot org
  2009-08-04 20:00 ` dodji at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: dodji at gcc dot gnu dot org @ 2009-08-04 19:50 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from dodji at gcc dot gnu dot org  2009-08-04 19:50 -------
Subject: Bug 39987

Author: dodji
Date: Tue Aug  4 19:49:48 2009
New Revision: 150467

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=150467
Log:
2009-08-04  Dodji Seketeli  <dodji@redhat.com>

gcc/cp/ChangeLog:
        PR c++/39987
        * pt.c (tsubst_default_argument): Let access checks of the
        default argument happen in the context of the current function.

gcc/testsuite/ChangeLog:
        PR c++/39987
        * g++.dg/overload/defarg4.C: New test.


Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/pt.c
    trunk/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug c++/39987] [4.3/4.4/4.5 Regression] Rejects default argument that is a template via access failure
  2009-05-01  0:49 [Bug c++/39987] New: [4.3/4.4/4.5 Regression] Rejects default argument that is a template via access failure pinskia at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2009-08-04 19:50 ` dodji at gcc dot gnu dot org
@ 2009-08-04 20:00 ` dodji at gcc dot gnu dot org
  2009-08-04 20:01 ` dodji at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: dodji at gcc dot gnu dot org @ 2009-08-04 20:00 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from dodji at gcc dot gnu dot org  2009-08-04 19:59 -------
Subject: Bug 39987

Author: dodji
Date: Tue Aug  4 19:59:48 2009
New Revision: 150468

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=150468
Log:
2009-08-04  Dodji Seketeli  <dodji@redhat.com>

gcc/cp/ChangeLog:
        PR c++/39987
        * pt.c (tsubst_default_argument): Let access checks of the
        default argument happen in the context of the current function.

gcc/testsuite/ChangeLog:
        PR c++/39987
        * g++.dg/overload/defarg4.C: New test.


Modified:
    branches/gcc-4_4-branch/gcc/cp/ChangeLog
    branches/gcc-4_4-branch/gcc/cp/pt.c
    branches/gcc-4_4-branch/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug c++/39987] [4.3/4.4/4.5 Regression] Rejects default argument that is a template via access failure
  2009-05-01  0:49 [Bug c++/39987] New: [4.3/4.4/4.5 Regression] Rejects default argument that is a template via access failure pinskia at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2009-08-04 20:00 ` dodji at gcc dot gnu dot org
@ 2009-08-04 20:01 ` dodji at gcc dot gnu dot org
  2009-08-07 10:07 ` mikpe at it dot uu dot se
                   ` (7 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: dodji at gcc dot gnu dot org @ 2009-08-04 20:01 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from dodji at gcc dot gnu dot org  2009-08-04 20:01 -------
Fixed in 4.5 and 4.4 branches. Won't be fixed in 4.3 as this fix depends on the
fix for PR c++/37971, and that later fix hasn't been applied to the 4.3 branch.

Can this bug be closed still ?


-- 


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


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

* [Bug c++/39987] [4.3/4.4/4.5 Regression] Rejects default argument that is a template via access failure
  2009-05-01  0:49 [Bug c++/39987] New: [4.3/4.4/4.5 Regression] Rejects default argument that is a template via access failure pinskia at gcc dot gnu dot org
                   ` (6 preceding siblings ...)
  2009-08-04 20:01 ` dodji at gcc dot gnu dot org
@ 2009-08-07 10:07 ` mikpe at it dot uu dot se
  2009-08-07 13:13 ` dodji at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: mikpe at it dot uu dot se @ 2009-08-07 10:07 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from mikpe at it dot uu dot se  2009-08-07 10:06 -------
The test case doesn't appear to be in the repository.


-- 


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


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

* [Bug c++/39987] [4.3/4.4/4.5 Regression] Rejects default argument that is a template via access failure
  2009-05-01  0:49 [Bug c++/39987] New: [4.3/4.4/4.5 Regression] Rejects default argument that is a template via access failure pinskia at gcc dot gnu dot org
                   ` (7 preceding siblings ...)
  2009-08-07 10:07 ` mikpe at it dot uu dot se
@ 2009-08-07 13:13 ` dodji at gcc dot gnu dot org
  2009-08-07 13:16 ` dodji at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: dodji at gcc dot gnu dot org @ 2009-08-07 13:13 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from dodji at gcc dot gnu dot org  2009-08-07 13:13 -------
Subject: Bug 39987

Author: dodji
Date: Fri Aug  7 13:13:12 2009
New Revision: 150568

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=150568
Log:
2009-08-07  Dodji Seketeli  <dodji@redhat.com>

        PR c++/39987
        * gcc/testsuite/g++.dg/overload/defarg4.C: Oops, forgot to add
        the testcase.


Added:
    trunk/gcc/testsuite/g++.dg/overload/defarg4.C


-- 


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


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

* [Bug c++/39987] [4.3/4.4/4.5 Regression] Rejects default argument that is a template via access failure
  2009-05-01  0:49 [Bug c++/39987] New: [4.3/4.4/4.5 Regression] Rejects default argument that is a template via access failure pinskia at gcc dot gnu dot org
                   ` (8 preceding siblings ...)
  2009-08-07 13:13 ` dodji at gcc dot gnu dot org
@ 2009-08-07 13:16 ` dodji at gcc dot gnu dot org
  2009-08-07 13:16 ` dodji at redhat dot com
                   ` (4 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: dodji at gcc dot gnu dot org @ 2009-08-07 13:16 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from dodji at gcc dot gnu dot org  2009-08-07 13:16 -------
Subject: Bug 39987

Author: dodji
Date: Fri Aug  7 13:15:43 2009
New Revision: 150569

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=150569
Log:
2009-08-07  Dodji Seketeli  <dodji@redhat.com>

        PR c++/39987
        * gcc/testsuite/g++.dg/overload/defarg4.C: Oops, I foorgot to add this.


Added:
    branches/gcc-4_4-branch/gcc/testsuite/g++.dg/overload/defarg4.C


-- 


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


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

* [Bug c++/39987] [4.3/4.4/4.5 Regression] Rejects default argument that is a template via access failure
  2009-05-01  0:49 [Bug c++/39987] New: [4.3/4.4/4.5 Regression] Rejects default argument that is a template via access failure pinskia at gcc dot gnu dot org
                   ` (9 preceding siblings ...)
  2009-08-07 13:16 ` dodji at gcc dot gnu dot org
@ 2009-08-07 13:16 ` dodji at redhat dot com
  2009-08-10 10:10 ` [Bug c++/39987] [4.3 " dodji at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: dodji at redhat dot com @ 2009-08-07 13:16 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 503 bytes --]



------- Comment #8 from dodji at gcc dot gnu dot org  2009-08-07 13:16 -------
Subject: Re:  [4.3/4.4/4.5 Regression] Rejects default argument
 that is a template via access failure

Le 07/08/2009 12:06, mikpe at it dot uu dot se a écrit :
> ------- Comment #5 from mikpe at it dot uu dot se  2009-08-07 10:06 -------
> The test case doesn't appear to be in the repository.

Oops, correct. Sorry.
I have just added it.

Thanks for noticing.


-- 


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


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

* [Bug c++/39987] [4.3 Regression] Rejects default argument that is a template via access failure
  2009-05-01  0:49 [Bug c++/39987] New: [4.3/4.4/4.5 Regression] Rejects default argument that is a template via access failure pinskia at gcc dot gnu dot org
                   ` (10 preceding siblings ...)
  2009-08-07 13:16 ` dodji at redhat dot com
@ 2009-08-10 10:10 ` dodji at gcc dot gnu dot org
  2009-10-23 21:49 ` dodji at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: dodji at gcc dot gnu dot org @ 2009-08-10 10:10 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from dodji at gcc dot gnu dot org  2009-08-10 10:09 -------
Okay,I have adjusted the regression markers.
I won't apply the patch to 4.3 for now though.

To apply this patch to 4.3, one would need to backport the patch
http://gcc.gnu.org/viewcvs?view=rev&revision=142628 to 4.3 first.


-- 

dodji at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|dodji at gcc dot gnu dot org|unassigned at gcc dot gnu
                   |                            |dot org
             Status|ASSIGNED                    |NEW
            Summary|[4.3/4.4/4.5 Regression]    |[4.3 Regression] Rejects
                   |Rejects default argument    |default argument that is a
                   |that is a template via      |template via access failure
                   |access failure              |


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


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

* [Bug c++/39987] [4.3 Regression] Rejects default argument that is a template via access failure
  2009-05-01  0:49 [Bug c++/39987] New: [4.3/4.4/4.5 Regression] Rejects default argument that is a template via access failure pinskia at gcc dot gnu dot org
                   ` (11 preceding siblings ...)
  2009-08-10 10:10 ` [Bug c++/39987] [4.3 " dodji at gcc dot gnu dot org
@ 2009-10-23 21:49 ` dodji at gcc dot gnu dot org
  2009-12-26 19:17 ` paolo dot carlini at oracle dot com
  2009-12-26 20:31 ` dodji at gcc dot gnu dot org
  14 siblings, 0 replies; 16+ messages in thread
From: dodji at gcc dot gnu dot org @ 2009-10-23 21:49 UTC (permalink / raw)
  To: gcc-bugs



-- 

dodji at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.5.0                       |4.3.6


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


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

* [Bug c++/39987] [4.3 Regression] Rejects default argument that is a template via access failure
  2009-05-01  0:49 [Bug c++/39987] New: [4.3/4.4/4.5 Regression] Rejects default argument that is a template via access failure pinskia at gcc dot gnu dot org
                   ` (12 preceding siblings ...)
  2009-10-23 21:49 ` dodji at gcc dot gnu dot org
@ 2009-12-26 19:17 ` paolo dot carlini at oracle dot com
  2009-12-26 20:31 ` dodji at gcc dot gnu dot org
  14 siblings, 0 replies; 16+ messages in thread
From: paolo dot carlini at oracle dot com @ 2009-12-26 19:17 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from paolo dot carlini at oracle dot com  2009-12-26 19:16 -------
Dodji, can we close this one at this point?


-- 


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


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

* [Bug c++/39987] [4.3 Regression] Rejects default argument that is a template via access failure
  2009-05-01  0:49 [Bug c++/39987] New: [4.3/4.4/4.5 Regression] Rejects default argument that is a template via access failure pinskia at gcc dot gnu dot org
                   ` (13 preceding siblings ...)
  2009-12-26 19:17 ` paolo dot carlini at oracle dot com
@ 2009-12-26 20:31 ` dodji at gcc dot gnu dot org
  14 siblings, 0 replies; 16+ messages in thread
From: dodji at gcc dot gnu dot org @ 2009-12-26 20:31 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #11 from dodji at gcc dot gnu dot org  2009-12-26 20:31 -------
Yes, I forgot to do it. Sorry about that.
Setting the target milestone to 4.4 and closing.


-- 

dodji at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|4.3.6                       |4.4.4


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


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

end of thread, other threads:[~2009-12-26 20:31 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-01  0:49 [Bug c++/39987] New: [4.3/4.4/4.5 Regression] Rejects default argument that is a template via access failure pinskia at gcc dot gnu dot org
2009-05-01  0:49 ` [Bug c++/39987] " pinskia at gcc dot gnu dot org
2009-05-05 15:53 ` mmitchel at gcc dot gnu dot org
2009-08-04 12:03 ` dodji at gcc dot gnu dot org
2009-08-04 14:21 ` dodji at gcc dot gnu dot org
2009-08-04 19:50 ` dodji at gcc dot gnu dot org
2009-08-04 20:00 ` dodji at gcc dot gnu dot org
2009-08-04 20:01 ` dodji at gcc dot gnu dot org
2009-08-07 10:07 ` mikpe at it dot uu dot se
2009-08-07 13:13 ` dodji at gcc dot gnu dot org
2009-08-07 13:16 ` dodji at gcc dot gnu dot org
2009-08-07 13:16 ` dodji at redhat dot com
2009-08-10 10:10 ` [Bug c++/39987] [4.3 " dodji at gcc dot gnu dot org
2009-10-23 21:49 ` dodji at gcc dot gnu dot org
2009-12-26 19:17 ` paolo dot carlini at oracle dot com
2009-12-26 20:31 ` dodji 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).