public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/3518] default conversion to pointer-to-function is applied to soon (related to DR295)
       [not found] <20010701132600.3518.nathan@codesourcery.com>
@ 2003-08-23  1:34 ` dhazeghi at yahoo dot com
  2004-04-02 15:03 ` nathan at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 11+ messages in thread
From: dhazeghi at yahoo dot com @ 2003-08-23  1:34 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


dhazeghi at yahoo dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|3.4                         |---


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

* [Bug c++/3518] default conversion to pointer-to-function is applied to soon (related to DR295)
       [not found] <20010701132600.3518.nathan@codesourcery.com>
  2003-08-23  1:34 ` [Bug c++/3518] default conversion to pointer-to-function is applied to soon (related to DR295) dhazeghi at yahoo dot com
@ 2004-04-02 15:03 ` nathan at gcc dot gnu dot org
  2004-04-02 15:28 ` nathan at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 11+ messages in thread
From: nathan at gcc dot gnu dot org @ 2004-04-02 15:03 UTC (permalink / raw)
  To: gcc-bugs



-- 
Bug 3518 depends on bug 10807, which changed state.

Bug 10807 Summary: [DR 295] It should be possible to cv-qualify function types, if the CV qualifications are introduced through a typedef or a template argument
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=10807

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

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


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

* [Bug c++/3518] default conversion to pointer-to-function is applied to soon (related to DR295)
       [not found] <20010701132600.3518.nathan@codesourcery.com>
  2003-08-23  1:34 ` [Bug c++/3518] default conversion to pointer-to-function is applied to soon (related to DR295) dhazeghi at yahoo dot com
  2004-04-02 15:03 ` nathan at gcc dot gnu dot org
@ 2004-04-02 15:28 ` nathan at gcc dot gnu dot org
  2004-04-02 15:30 ` nathan at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 11+ messages in thread
From: nathan at gcc dot gnu dot org @ 2004-04-02 15:28 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From nathan at gcc dot gnu dot org  2004-04-02 15:27 -------
Here is a shorted test case.
template <typename T> void Foo (const T &);
template <typename T> void Baz (const T (*)());

int &f ();

int main()
{
  Foo (f);
  Baz (f);
}

AFAICT either both calls are good, or both are bad. edg 3.3 accepts the first,
but not the second. I'm asking John Spicer why.

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


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


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

* [Bug c++/3518] default conversion to pointer-to-function is applied to soon (related to DR295)
       [not found] <20010701132600.3518.nathan@codesourcery.com>
                   ` (2 preceding siblings ...)
  2004-04-02 15:28 ` nathan at gcc dot gnu dot org
@ 2004-04-02 15:30 ` nathan at gcc dot gnu dot org
  2004-04-02 15:35 ` bangerth at dealii dot org
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 11+ messages in thread
From: nathan at gcc dot gnu dot org @ 2004-04-02 15:30 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From nathan at gcc dot gnu dot org  2004-04-02 15:30 -------
If those calls are deduceable, then the deductions will involve
ignoring a cv qualifier on either a function type (Foo), or reference
type (Baz).  As we're not permitted to do that in deduction, then both
should fail, shouldn't they?

EDG 3.3 accepts the call for Foo, but rejects that of Baz.  I
do not understand why. Prior to fixing g++ bug 14007, g++ accepted
both calls, now it rejects both calls.

In Foo's case we are deducing the arguments from a function call, and
14.8.2.1 applies. p2 tells us to use 'const T' for deduction against an
A of 'int &()'. Why does this deduction succeed with T being 'int & ()'?
p3 tells us that the deduced A can be more cv qualified, but for that to
apply we must actually have a deduced A, and I can't see how we get there.


-- 


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


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

* [Bug c++/3518] default conversion to pointer-to-function is applied to soon (related to DR295)
       [not found] <20010701132600.3518.nathan@codesourcery.com>
                   ` (3 preceding siblings ...)
  2004-04-02 15:30 ` nathan at gcc dot gnu dot org
@ 2004-04-02 15:35 ` bangerth at dealii dot org
  2004-04-05 15:52 ` cvs-commit at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 11+ messages in thread
From: bangerth at dealii dot org @ 2004-04-02 15:35 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From bangerth at dealii dot org  2004-04-02 15:35 -------
In response to comment #6: I may be ignorant of special rules for function 
pointers, but when you call Baz(f) you call it with a _reference_ to a  
function as argument. However, Baz takes a _pointer_, so you would have to 
perform a conversion of the argument. Should this really be done here 
even for template arguments? 
 
W. 

-- 


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


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

* [Bug c++/3518] default conversion to pointer-to-function is applied to soon (related to DR295)
       [not found] <20010701132600.3518.nathan@codesourcery.com>
                   ` (4 preceding siblings ...)
  2004-04-02 15:35 ` bangerth at dealii dot org
@ 2004-04-05 15:52 ` cvs-commit at gcc dot gnu dot org
  2004-04-05 15:53 ` nathan at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-04-05 15:52 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-04-05 15:52 -------
Subject: Bug 3518

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	nathan@gcc.gnu.org	2004-04-05 15:52:12

Modified files:
	gcc/cp         : ChangeLog pt.c 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/g++.dg/template: unify7.C 

Log message:
	cp:
	PR c++/3518
	* pt.c (check_cv_quals_for_unify): Ignore bogus CV quals at outer
	level.
	testsuite:
	PR c++/3518
	* g++.dg/template/unify7.C: New.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.4028&r2=1.4029
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/pt.c.diff?cvsroot=gcc&r1=1.846&r2=1.847
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.3652&r2=1.3653
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/unify7.C.diff?cvsroot=gcc&r1=NONE&r2=1.1



-- 


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


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

* [Bug c++/3518] default conversion to pointer-to-function is applied to soon (related to DR295)
       [not found] <20010701132600.3518.nathan@codesourcery.com>
                   ` (5 preceding siblings ...)
  2004-04-05 15:52 ` cvs-commit at gcc dot gnu dot org
@ 2004-04-05 15:53 ` nathan at gcc dot gnu dot org
  2004-04-05 15:54 ` nathan at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 11+ messages in thread
From: nathan at gcc dot gnu dot org @ 2004-04-05 15:53 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From nathan at gcc dot gnu dot org  2004-04-05 15:53 -------
2004-04-05  Nathan Sidwell  <nathan@codesourcery.com>

	PR c++/3518
	* pt.c (check_cv_quals_for_unify): Ignore bogus CV quals at outer
	level.

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


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


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

* [Bug c++/3518] default conversion to pointer-to-function is applied to soon (related to DR295)
       [not found] <20010701132600.3518.nathan@codesourcery.com>
                   ` (6 preceding siblings ...)
  2004-04-05 15:53 ` nathan at gcc dot gnu dot org
@ 2004-04-05 15:54 ` nathan at gcc dot gnu dot org
  2004-04-05 15:55 ` nathan at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 11+ messages in thread
From: nathan at gcc dot gnu dot org @ 2004-04-05 15:54 UTC (permalink / raw)
  To: gcc-bugs



-- 
Bug 3518 depends on bug 10807, which changed state.

Bug 10807 Summary: [DR 295] It should be possible to cv-qualify function types, if the CV qualifications are introduced through a typedef or a template argument
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=10807

           What    |Old Value                   |New Value
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|INVALID                     |

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


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

* [Bug c++/3518] default conversion to pointer-to-function is applied to soon (related to DR295)
       [not found] <20010701132600.3518.nathan@codesourcery.com>
                   ` (7 preceding siblings ...)
  2004-04-05 15:54 ` nathan at gcc dot gnu dot org
@ 2004-04-05 15:55 ` nathan at gcc dot gnu dot org
  2004-04-05 15:56 ` pinskia at gcc dot gnu dot org
  2004-06-21 12:46 ` cvs-commit at gcc dot gnu dot org
  10 siblings, 0 replies; 11+ messages in thread
From: nathan at gcc dot gnu dot org @ 2004-04-05 15:55 UTC (permalink / raw)
  To: gcc-bugs



-- 
Bug 3518 depends on bug 10807, which changed state.

Bug 10807 Summary: [DR 295] It should be possible to cv-qualify function types, if the CV qualifications are introduced through a typedef or a template argument
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=10807

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

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


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

* [Bug c++/3518] default conversion to pointer-to-function is applied to soon (related to DR295)
       [not found] <20010701132600.3518.nathan@codesourcery.com>
                   ` (8 preceding siblings ...)
  2004-04-05 15:55 ` nathan at gcc dot gnu dot org
@ 2004-04-05 15:56 ` pinskia at gcc dot gnu dot org
  2004-06-21 12:46 ` cvs-commit at gcc dot gnu dot org
  10 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-04-05 15:56 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |3.5.0


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


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

* [Bug c++/3518] default conversion to pointer-to-function is applied to soon (related to DR295)
       [not found] <20010701132600.3518.nathan@codesourcery.com>
                   ` (9 preceding siblings ...)
  2004-04-05 15:56 ` pinskia at gcc dot gnu dot org
@ 2004-06-21 12:46 ` cvs-commit at gcc dot gnu dot org
  10 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-06-21 12:46 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-06-21 12:46 -------
Subject: Bug 3518

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-3_4-branch
Changes by:	nathan@gcc.gnu.org	2004-06-21 12:46:29

Modified files:
	gcc/cp         : ChangeLog pt.c tree.c 
	gcc/testsuite  : ChangeLog 
	gcc/testsuite/g++.dg/template: qualttp20.C 
	gcc/testsuite/g++.old-deja/g++.jason: report.C 
	gcc/testsuite/g++.old-deja/g++.other: qual1.C 
Added files:
	gcc/testsuite/g++.dg/template: unify5.C unify6.C unify7.C 

Log message:
	cp:
	PR c++/3518
	* pt.c (check_cv_quals_for_unify): Ignore bogus CV quals at outer
	level.
	
	PR c++/14007
	* pt.c (check_cv_quals_for_unify): Correct logic for disallowed
	cv-qualifier unification.
	* tree.c (cp_build_qualified_type_real): Renable DR295 logic.
	testsuite:
	PR c++/3518
	* g++.dg/template/unify7.C: New.
	
	PR c++/14007
	* g++.dg/template/unify5.C: New.
	* g++.dg/template/unify6.C: New.
	* g++.dg/template/qualttp20.C: Adjust.
	* g++.old-deja/g++.jason/report.C: Adjust.
	* g++.old-deja/g++.other/qual1.C: Adjust.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.3892.2.125&r2=1.3892.2.126
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/pt.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.816.2.31&r2=1.816.2.32
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/tree.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.360.4.6&r2=1.360.4.7
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.3389.2.212&r2=1.3389.2.213
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/unify5.C.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=NONE&r2=1.1.18.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/unify6.C.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=NONE&r2=1.1.18.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/unify7.C.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=NONE&r2=1.1.18.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/qualttp20.C.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.4&r2=1.4.32.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.old-deja/g++.jason/report.C.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.10&r2=1.10.16.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.old-deja/g++.other/qual1.C.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.5&r2=1.5.16.1



-- 


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


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

end of thread, other threads:[~2004-06-21 12:46 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20010701132600.3518.nathan@codesourcery.com>
2003-08-23  1:34 ` [Bug c++/3518] default conversion to pointer-to-function is applied to soon (related to DR295) dhazeghi at yahoo dot com
2004-04-02 15:03 ` nathan at gcc dot gnu dot org
2004-04-02 15:28 ` nathan at gcc dot gnu dot org
2004-04-02 15:30 ` nathan at gcc dot gnu dot org
2004-04-02 15:35 ` bangerth at dealii dot org
2004-04-05 15:52 ` cvs-commit at gcc dot gnu dot org
2004-04-05 15:53 ` nathan at gcc dot gnu dot org
2004-04-05 15:54 ` nathan at gcc dot gnu dot org
2004-04-05 15:55 ` nathan at gcc dot gnu dot org
2004-04-05 15:56 ` pinskia at gcc dot gnu dot org
2004-06-21 12:46 ` cvs-commit 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).