public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/18296] New: Misleading diagnostic for recursive template instantiation
@ 2004-11-04 14:17 rguenth at tat dot physik dot uni-tuebingen dot de
2004-11-04 14:26 ` [Bug c++/18296] " pinskia at gcc dot gnu dot org
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: rguenth at tat dot physik dot uni-tuebingen dot de @ 2004-11-04 14:17 UTC (permalink / raw)
To: gcc-bugs
template <class E, class C>
struct CompFwd;
struct Brick;
template <int Dim, class T, class EngineTag>
struct Engine;
template <int Dim, class T, class E>
class Array;
template <class Subject>
struct ComponentView;
template<int Dim, class T, class EngineTag>
struct ComponentView<Array<Dim, T, EngineTag> >
{
typedef Array<Dim, T, EngineTag> Subject_t;
typedef typename Subject_t::Engine_t Engine_t;
typedef Array<Dim, T, CompFwd<Engine_t, int> > Type_t;
};
template <int Dim, class T, class EngineTag>
struct Array
{
typedef Engine<Dim, T, EngineTag> Engine_t;
typedef Array<Dim, T, EngineTag> This_t;
typename ComponentView<This_t>::Type_t
comp(int i1) const;
};
typedef Array<1, double, Brick> Array_t;
typedef ComponentView<Array_t>::Type_t CView_t;
causes g++ to emit:
tests> g++-3.4 -c notype.cpp
notype.cpp: In instantiation of `Array<1, double, Brick>':
notype.cpp:19: instantiated from `ComponentView<Array_t>'
notype.cpp:36: instantiated from here
notype.cpp:30: error: no type named `Type_t' in `struct ComponentView<Array_t>'
which could be improved to mention the missing of the type is caused by aborted
recursive instantiation of struct ComponentView<Array_t>. At the moment the
diagnostic is at least misleading, as there is a Type_t in struct
ComponentView<Array_t>.
--
Summary: Misleading diagnostic for recursive template
instantiation
Product: gcc
Version: 3.4.3
Status: UNCONFIRMED
Severity: enhancement
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: rguenth at tat dot physik dot uni-tuebingen dot de
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18296
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/18296] Misleading diagnostic for recursive template instantiation
2004-11-04 14:17 [Bug c++/18296] New: Misleading diagnostic for recursive template instantiation rguenth at tat dot physik dot uni-tuebingen dot de
@ 2004-11-04 14:26 ` pinskia at gcc dot gnu dot org
2004-11-04 14:27 ` pinskia at gcc dot gnu dot org
2004-11-04 14:30 ` rguenth at tat dot physik dot uni-tuebingen dot de
2 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-11-04 14:26 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-11-04 14:26 -------
Confirmed, I think PR 15538 would fix the problem because the class is an incomplete type at this
point.
--
What |Removed |Added
----------------------------------------------------------------------------
BugsThisDependsOn| |15538
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2004-11-04 14:26:05
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18296
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/18296] Misleading diagnostic for recursive template instantiation
2004-11-04 14:17 [Bug c++/18296] New: Misleading diagnostic for recursive template instantiation rguenth at tat dot physik dot uni-tuebingen dot de
2004-11-04 14:26 ` [Bug c++/18296] " pinskia at gcc dot gnu dot org
@ 2004-11-04 14:27 ` pinskia at gcc dot gnu dot org
2004-11-04 14:30 ` rguenth at tat dot physik dot uni-tuebingen dot de
2 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-11-04 14:27 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-11-04 14:27 -------
Actually looking at the example in PR 15538, the template in there is a recursive template instantiation
so I am closing this as a dup.
*** This bug has been marked as a duplicate of 15538 ***
--
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |DUPLICATE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18296
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/18296] Misleading diagnostic for recursive template instantiation
2004-11-04 14:17 [Bug c++/18296] New: Misleading diagnostic for recursive template instantiation rguenth at tat dot physik dot uni-tuebingen dot de
2004-11-04 14:26 ` [Bug c++/18296] " pinskia at gcc dot gnu dot org
2004-11-04 14:27 ` pinskia at gcc dot gnu dot org
@ 2004-11-04 14:30 ` rguenth at tat dot physik dot uni-tuebingen dot de
2 siblings, 0 replies; 5+ messages in thread
From: rguenth at tat dot physik dot uni-tuebingen dot de @ 2004-11-04 14:30 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From rguenth at tat dot physik dot uni-tuebingen dot de 2004-11-04 14:30 -------
Subject: Re: Misleading diagnostic for recursive template
instantiation
On 4 Nov 2004, pinskia at gcc dot gnu dot org wrote:
> Confirmed, I think PR 15538 would fix the problem because the class is an incomplete type at this
> point.
Yes, maybe - though icpc (7.1 and 8.0) in this case isn't helpful, too:
tests> icpc -c notype.cpp
notype.cpp(29): error: class "ComponentView<Array_t>" has no member
"Type_t"
typename ComponentView<This_t>::Type_t
^
detected during:
instantiation of class "Array<Dim, T, EngineTag> [with Dim=1,
T=double, EngineTag=Brick]" at line 19
instantiation of class "ComponentView<Array<Dim, T,
EngineTag>> [with Dim=1, T=double, EngineTag=Brick]" at line 36
compilation aborted for notype.cpp (code 2)
suspiciously similar to gcc.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18296
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/18296] Misleading diagnostic for recursive template instantiation
[not found] <bug-18296-4@http.gcc.gnu.org/bugzilla/>
@ 2021-08-05 2:45 ` pinskia at gcc dot gnu.org
0 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-08-05 2:45 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=18296
Bug 18296 depends on bug 15538, which changed state.
Bug 15538 Summary: Misleading diagnostic for recursive template instantiation
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=15538
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-08-05 2:45 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-11-04 14:17 [Bug c++/18296] New: Misleading diagnostic for recursive template instantiation rguenth at tat dot physik dot uni-tuebingen dot de
2004-11-04 14:26 ` [Bug c++/18296] " pinskia at gcc dot gnu dot org
2004-11-04 14:27 ` pinskia at gcc dot gnu dot org
2004-11-04 14:30 ` rguenth at tat dot physik dot uni-tuebingen dot de
[not found] <bug-18296-4@http.gcc.gnu.org/bugzilla/>
2021-08-05 2:45 ` pinskia at gcc dot gnu.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).