This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/63198] decltype in template function declaration yields spurious error
- From: "eightycc at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 03 Nov 2014 14:37:06 +0000
- Subject: [Bug c++/63198] decltype in template function declaration yields spurious error
- Auto-submitted: auto-generated
- References: <bug-63198-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63198
--- Comment #2 from Bob Abeles <eightycc at gmail dot com> ---
This bug occurs when cp/parser.c:cp_parser_name() while parsing 'decltype(y =
y)::t1' is called on 't1'. Earlier, the decltype has been determined to be
dependent (it isn't actually in this case, but doing so appears to be a
reasonable simplification), so cp_parser_name() defers the look up and returns
the result of cp/tree.c:build_qualified_name().
The calling routine, cp/parser.c:cp_parser_class_name() fails to handle this
case, returning an error_mark_node.