This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/15339] [DR217] Adding default arguments to function templates in redeclartions should be forbidden


------- Additional Comments From MichaelLi8195 at hotmail dot com  2004-05-09 14:17 -------
Subject: RE:  [DR217] Adding default arguments to function templates in
 redeclartions should be forbidden

I could not find "g++.dg/tc1/dr217.C" in the testsuite of the recently 
released package gcc-3.4.0.tar.bz2. Where could I get it? Thanks.


>From: "giovannibajo at libero dot it" <gcc-bugzilla@gcc.gnu.org>
>Reply-To: gcc-bugzilla@gcc.gnu.org
>To: MichaelLi8195@hotmail.com
>Subject: [Bug c++/15339] [DR217] Adding default arguments to function 
templates in redeclartions should be forbidden
>Date: 8 May 2004 16:32:58 -0000
>
>------- Additional Comments From giovannibajo at libero dot it  2004-05-08 
16:32 -------
>This should be diagnosed:
>
>------------------------------------
>template<typename> void fun(int);
>template<typename> void fun(int = 0) {}
>------------------------------------
>
>but it's not. I don't think it's a regression, but can anybody check?
>
>Also, DR217 (TC1 status) says that this is also for regular member 
function of
>class templates. In other words, the following is invalid as well:
>
>------------------------------------
>     template <class T>
>     struct S
>     {
>	void foo (int);
>     };
>
>     template <class T>
>     void S<T>::foo (int = 0) { }
>------------------------------------
>(note that this testcase is already in our testsuite: g++.dg/tc1/dr217.C)
>
>
>--
>            What    |Removed                     |Added
>----------------------------------------------------------------------------

>            Keywords|                            |accepts-invalid
>       Known to fail|                            |3.4.0 3.5.0
>             Summary|function call error         |[DR217] Adding default
>                    |                            |arguments to function
>                    |                            |templates in 
redeclartions
>                    |                            |should be forbidden
>
>
>http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15339
>
>------- You are receiving this mail because: -------
>You reported the bug, or are watching the reporter.




-- 


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]