public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/17410] Specialization of nested template rejected because of unrelated declaration
[not found] <bug-17410-7390@http.gcc.gnu.org/bugzilla/>
@ 2007-09-23 12:15 ` rguenth at gcc dot gnu dot org
2009-03-05 16:08 ` jason at gcc dot gnu dot org
1 sibling, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2007-09-23 12:15 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from rguenth at gcc dot gnu dot org 2007-09-23 12:15 -------
Re-confirmed.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jason at redhat dot com,
| |mark at codesourcery dot com
Known to fail|2.95.3 3.0.4 3.2.3 3.3.3 |2.95.3 3.0.4 3.2.3 3.3.3
|3.4.0 4.0.0 4.1.0 |3.4.0 4.0.0 4.1.0 4.3.0
Last reconfirmed|2005-10-27 16:27:41 |2007-09-23 12:15:33
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17410
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/17410] Specialization of nested template rejected because of unrelated declaration
[not found] <bug-17410-7390@http.gcc.gnu.org/bugzilla/>
2007-09-23 12:15 ` [Bug c++/17410] Specialization of nested template rejected because of unrelated declaration rguenth at gcc dot gnu dot org
@ 2009-03-05 16:08 ` jason at gcc dot gnu dot org
1 sibling, 0 replies; 5+ messages in thread
From: jason at gcc dot gnu dot org @ 2009-03-05 16:08 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from jason at gcc dot gnu dot org 2009-03-05 16:08 -------
The bug is in lookup_template_class's search for a matching partial
instantiation; it finds Outer<void>::Inner<T*> and assumes it's
Outer<void>::Inner<T> without checking the innermost template args.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17410
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/17410] Specialization of nested template rejected because of unrelated declaration
[not found] <bug-17410-4@http.gcc.gnu.org/bugzilla/>
2013-05-16 16:37 ` paolo.carlini at oracle dot com
@ 2013-05-16 16:58 ` paolo.carlini at oracle dot com
1 sibling, 0 replies; 5+ messages in thread
From: paolo.carlini at oracle dot com @ 2013-05-16 16:58 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17410
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Known to work| |4.8.0, 4.9.0
Resolution|--- |FIXED
--- Comment #10 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Done.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/17410] Specialization of nested template rejected because of unrelated declaration
[not found] <bug-17410-4@http.gcc.gnu.org/bugzilla/>
@ 2013-05-16 16:37 ` paolo.carlini at oracle dot com
2013-05-16 16:58 ` paolo.carlini at oracle dot com
1 sibling, 0 replies; 5+ messages in thread
From: paolo.carlini at oracle dot com @ 2013-05-16 16:37 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17410
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC|gcc-bugs at gcc dot gnu.org |
Known to fail| |
--- Comment #9 from Paolo Carlini <paolo.carlini at oracle dot com> ---
This has been fixed *long* time ago, in 4.5.x. To be safe I'm adding testcase
in Comment #2 before closing the bug.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/17410] Specialization of nested template rejected because of unrelated declaration
2004-09-10 21:13 [Bug c++/17410] New: selects general template instead of valid specialization with nested template cppljevans at cox-internet dot com
@ 2004-09-11 14:02 ` cppljevans at cox-internet dot com
0 siblings, 0 replies; 5+ messages in thread
From: cppljevans at cox-internet dot com @ 2004-09-11 14:02 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cppljevans at cox-internet dot com 2004-09-11 14:02 -------
(In reply to comment #2)
> This is weird. Redux:
>
> -------------------------------------------------------
> template <class>
> struct Outer {
> template <class> struct Inner {};
> };
>
> template <class T>
> struct A;
>
> template <template <class> class Q, class P>
> struct A <Q<P> > {};
>
> template <class T> struct UNRELATED;
> template <class T> struct UNRELATED<Outer<void>::Inner<T*> >;
>
> template struct A<Outer<void>::Inner<int*> >;
> -------------------------------------------------------
>
> This should be accepted, because the specialization of A should be matched
> (with Q = "Outer<void>::Inner", and P = "int*" of course). Instead, it does
> not, *unless* you comment the UNRELATED template.
My new attachment contains a run which shows gcc instantiates
the specialization when the template argument is not nested;
however, gcc instantiates the general template when the template
argument is nested. icc does it correctly. I've also attached
the test.mk makefile which I used.
>
> Looks like something gets alterated in the tsubst process. Not a regression,
> though (the original code manages to be rejected everywhere, while the redux
> even ICEs older compilers).
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17410
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-05-16 16:58 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <bug-17410-7390@http.gcc.gnu.org/bugzilla/>
2007-09-23 12:15 ` [Bug c++/17410] Specialization of nested template rejected because of unrelated declaration rguenth at gcc dot gnu dot org
2009-03-05 16:08 ` jason at gcc dot gnu dot org
[not found] <bug-17410-4@http.gcc.gnu.org/bugzilla/>
2013-05-16 16:37 ` paolo.carlini at oracle dot com
2013-05-16 16:58 ` paolo.carlini at oracle dot com
2004-09-10 21:13 [Bug c++/17410] New: selects general template instead of valid specialization with nested template cppljevans at cox-internet dot com
2004-09-11 14:02 ` [Bug c++/17410] Specialization of nested template rejected because of unrelated declaration cppljevans at cox-internet dot com
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).