public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/18950] specialization of template class with inner template members
[not found] <bug-18950-4@http.gcc.gnu.org/bugzilla/>
@ 2014-07-07 8:59 ` paolo.carlini at oracle dot com
0 siblings, 0 replies; 5+ messages in thread
From: paolo.carlini at oracle dot com @ 2014-07-07 8:59 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=18950
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC|bkoz at redhat dot com, |
|gcc-bugs at gcc dot gnu.org |
Known to work| |4.10.0, 4.8.0, 4.9.0
Resolution|--- |FIXED
Known to fail| |
--- Comment #5 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Fixed looong time ago.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/18950] specialization of template class with inner template members
2004-12-13 9:42 [Bug c++/18950] New: " boris at buf dot com
` (2 preceding siblings ...)
2004-12-13 17:36 ` boris at buf dot com
@ 2004-12-13 18:09 ` pinskia at gcc dot gnu dot org
3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-12-13 18:09 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-12-13 18:09 -------
(In reply to comment #3)
> (In reply to comment #2)
>
> Sorry about the misinformation in the first place.
I split this off to PR 18962, yes that testcase is a regression, but I think the problem which causes to
reject the first testcase and the second one, is different which is why I split it off to a new bug report.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18950
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/18950] specialization of template class with inner template members
2004-12-13 9:42 [Bug c++/18950] New: " boris at buf dot com
2004-12-13 15:27 ` [Bug c++/18950] " lerdsuwa at gcc dot gnu dot org
2004-12-13 15:55 ` pinskia at gcc dot gnu dot org
@ 2004-12-13 17:36 ` boris at buf dot com
2004-12-13 18:09 ` pinskia at gcc dot gnu dot org
3 siblings, 0 replies; 5+ messages in thread
From: boris at buf dot com @ 2004-12-13 17:36 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From boris at buf dot com 2004-12-13 17:36 -------
(In reply to comment #2)
> 3.3.2 also rejects this code also:
I'm really sorry, it seems I oversimplified our real test case
(the previous problem might be related, but indeed it's not a regression).
The following code is a closer version of what we have, and this time
it compiles fine with g++ 3.3.1, but not with g++ 3.4.0 :
template<class T1,int N1>
class Class
{
public:
template <class T2,int N2> void function( const Class<T2,N2>& );
};
template<>
template<class T2,int N2>
void Class<int,1>::function( const Class<T2,N2>& param )
{
param;// line 12
}
int main()
{
Class<int,1> instance;
Class<char,2> param;
instance.function( param );
}
The output is :
test-gcc34.cpp: In member function `void Class<T1, N1>::function(const Class<T2,
N2>&) [with T2 = T2, int N2 = N2, T1 = int, int N1 = 1]':
test-gcc34.cpp:12: error: `param' undeclared (first use this function)
test-gcc34.cpp:12: error: (Each undeclared identifier is reported only once for
each function it appears in.)
Sorry about the misinformation in the first place.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18950
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/18950] specialization of template class with inner template members
2004-12-13 9:42 [Bug c++/18950] New: " boris at buf dot com
2004-12-13 15:27 ` [Bug c++/18950] " lerdsuwa at gcc dot gnu dot org
@ 2004-12-13 15:55 ` pinskia at gcc dot gnu dot org
2004-12-13 17:36 ` boris at buf dot com
2004-12-13 18:09 ` pinskia at gcc dot gnu dot org
3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-12-13 15:55 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-12-13 15:54 -------
3.3.2 also rejects this code also:
pr18950.cc:11: error: template-id `function<>' for `T2 Class<int,
1>::function(T2)' does not match any template declaration
pr18950.cc:11: error: syntax error before `{' token
--
What |Removed |Added
----------------------------------------------------------------------------
Known to fail| |2.95.3 3.0.4 3.2.3 3.4.3
| |4.0.0 3.3.2
Known to work|2.95.3 3.0.4 3.2.3 3.4.3 |
|4.0.0 |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18950
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/18950] specialization of template class with inner template members
2004-12-13 9:42 [Bug c++/18950] New: " boris at buf dot com
@ 2004-12-13 15:27 ` lerdsuwa at gcc dot gnu dot org
2004-12-13 15:55 ` pinskia at gcc dot gnu dot org
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: lerdsuwa at gcc dot gnu dot org @ 2004-12-13 15:27 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From lerdsuwa at gcc dot gnu dot org 2004-12-13 15:27 -------
Should be allowed according to 14.7.3/16. All my GCC versions
fail to compile the testcase (maybe some 3.3.x does) so I can't
verify that it's a regression.
The problem is some incorrect logic in 'determine_specialization':
it tries to deduce N2 from
template<> template<class T2,int N2>
T2 Class<int,1>::function( T2 param )
to match against
template<class T1,int N1> template<class T2,int N2>
T2 Class<T1,N1>::function( T2 param );
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Known to work| |2.95.3 3.0.4 3.2.3 3.4.3
| |4.0.0
Last reconfirmed|0000-00-00 00:00:00 |2004-12-13 15:27:08
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18950
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-07-07 8:59 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <bug-18950-4@http.gcc.gnu.org/bugzilla/>
2014-07-07 8:59 ` [Bug c++/18950] specialization of template class with inner template members paolo.carlini at oracle dot com
2004-12-13 9:42 [Bug c++/18950] New: " boris at buf dot com
2004-12-13 15:27 ` [Bug c++/18950] " lerdsuwa at gcc dot gnu dot org
2004-12-13 15:55 ` pinskia at gcc dot gnu dot org
2004-12-13 17:36 ` boris at buf dot com
2004-12-13 18:09 ` pinskia 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).