[Bug c++/99] Bug in template type in error message.
manu at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sun Apr 13 18:09:00 GMT 2014
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=99
Manuel López-Ibáñez <manu at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |paolo.carlini at oracle dot com
--- Comment #21 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
(In reply to Christian Ehrhardt from comment #5)
> From: "Christian Ehrhardt" <ehrhardt@mathematik.uni-ulm.de>
> To: gcc-gnats@gcc.gnu.org, gcc-bugs@gcc.gnu.org, carlo@alinoe.com,
> gdr@gcc.gnu.org, gcc-prs@gcc.gnu.org, martin@loewis.home.cs.tu-berlin.de
> Cc:
> Subject: Re: c++/99: [2003-03-26] Bug in type in error message.
> Date: Tue, 6 May 2003 15:04:23 +0200
>
> Here's a further reduced testcase, along with some more analysis:
>
> template<typename S> class X {};
> template<typename Q> int f(X<int>, X<Q>);
> template<typename B> int f(X<B>, X<int>);
>
> int main(void) {
> return f(X<int>(), X<int>());
> }
>
For this testcase, the problem is that:
(gdb) p debug_tree(arglist)
<tree_vec 0x7ffff7570d40
elt 0 <template_type_parm 0x7ffff7566348 Q VOID
align 8 symtab 0 alias set -1 canonical type 0x7ffff7566150
index 0 level 1 orig_level 1
chain <type_decl 0x7ffff755fc38 Q>>>
and
(gdb) p debug_tree(arglist)
<tree_vec 0x7ffff7570e60
elt 0 <template_type_parm 0x7ffff7566690 B VOID
align 8 symtab 0 alias set -1 canonical type 0x7ffff7566150
index 0 level 1 orig_level 1
chain <type_decl 0x7ffff755ff18 B>>>
have the same hash:
(gdb) p hash
$128 = 3284467468
I am not sure whether we should change the hashing function or whether we
should add some additional check. But what kind of check?
More information about the Gcc-bugs
mailing list