This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/14020] New: template keyword used as a disambiguator not conforming to ISO C++ 98
- From: "bernie at develer dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 4 Feb 2004 20:27:31 -0000
- Subject: [Bug c++/14020] New: template keyword used as a disambiguator not conforming to ISO C++ 98
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The attached testcase, extracted from the AC_CXX_TEMPLATE_KEYWORD_QUALIFIER
macro, produces the following error with 3.4 and tree-ssa:
foo.cc: In function `int main()':
foo.cc:9: error: `template' (as a disambiguator) is only allowed within templates
Used to work fine back in 3.3.2.
According to the standard (14.2/4):
When the name of a member template specialization appears
after . or -> in a postfix-expression, or after
nested-name-specifier in a qualified-id, and the
postfix-expression or qualified-id explicitly depends on a
template-parameter (14.6.2), the member template name must
be prefixed by the keyword template.
Otherwise the name is assumed to name a non-template.
--
Summary: template keyword used as a disambiguator not conforming
to ISO C++ 98
Product: gcc
Version: 3.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: bernie at develer dot com
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14020