public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* c++/4908: Pointer to function type template arguments include default argument info
@ 2001-11-14 10:36 Jaakko Jarvi
  0 siblings, 0 replies; 3+ messages in thread
From: Jaakko Jarvi @ 2001-11-14 10:36 UTC (permalink / raw)
  To: gcc-gnats


>Number:         4908
>Category:       c++
>Synopsis:       Pointer to function type template arguments include default argument info
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          accepts-illegal
>Submitter-Id:   net
>Arrival-Date:   Mon Nov 19 13:56:00 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     Jaakko Jarvi
>Release:        3.0.2
>Organization:
Indiana University, Computer Science
>Environment:
System: SunOS trillian.osl.iu.edu 5.8 Generic_108528-09 sun4u sparc SUNW,Sun-Blade-100
Architecture: sun4

	
host: sparc-sun-solaris2.8
build: sparc-sun-solaris2.8
target: sparc-sun-solaris2.8
configured with: ./configure --prefix=/l/gcc302
>Description:
	Function default arguments should not be part of the pointer to 
	function type. However, when a type template parameter is instantiated
	with a pointer to function, information about default arguments seem
	to lurk in somewhat strangely.

	The following code compiles and runs:
        void foo(int i=1);
        template<class F> void call(F f) { f(); }

        The test program in the How-To-Repeat part is self explaining
>How-To-Repeat:

#include <iostream>

using namespace std;

void foo(int i = 1) { cout << "foo " << i << endl; } 

void bar(int i) { cout << "bar " << i << endl; } 

template <class F>
void call(F f, F g) { f(); g(); }

int main() {

  call(&foo, &bar);
  return 0;

}

>Fix:
	



>Release-Note:
>Audit-Trail:
>Unformatted:


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

* Re: c++/4908: Pointer to function type template arguments include default argument info
@ 2002-06-10  1:36 Wolfgang Bangerth
  0 siblings, 0 replies; 3+ messages in thread
From: Wolfgang Bangerth @ 2002-06-10  1:36 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR c++/4908; it has been noted by GNATS.

From: Wolfgang Bangerth <bangerth@math.ethz.ch>
To: lerdsuwa@gcc.gnu.org, <gcc-bugs@gcc.gnu.org>, <gcc-prs@gcc.gnu.org>,
        <gcc-gnat@gcc.gnu.org>, <gcc-gnats@gcc.gnu.org>, <jajarvi@osl.iu.edu>
Cc:  
Subject: Re: c++/4908: Pointer to function type template arguments include
 default argument info
Date: Mon, 10 Jun 2002 10:31:23 +0200 (CEST)

 Just for reference, this bug may be related to c++/2862 and c++/2863, 
 which also take default parameters into the function signature.
 
 Regards
   Wolfgang
 
 -------------------------------------------------------------------------
 Wolfgang Bangerth                 email:            bangerth@math.ethz.ch
                                   www: http://www.math.ethz.ch/~bangerth/
 
 


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

* Re: c++/4908: Pointer to function type template arguments include default argument info
@ 2002-06-08  7:51 lerdsuwa
  0 siblings, 0 replies; 3+ messages in thread
From: lerdsuwa @ 2002-06-08  7:51 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, jajarvi, nobody

Synopsis: Pointer to function type template arguments include default argument info

State-Changed-From-To: open->analyzed
State-Changed-By: lerdsuwa
State-Changed-When: Sat Jun  8 07:51:26 2002
State-Changed-Why:
    Confirmed.  The code should not compile.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=4908


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

end of thread, other threads:[~2002-06-10  8:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-11-14 10:36 c++/4908: Pointer to function type template arguments include default argument info Jaakko Jarvi
2002-06-08  7:51 lerdsuwa
2002-06-10  1:36 Wolfgang Bangerth

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).