This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/14020] New: template keyword used as a disambiguator not conforming to ISO C++ 98


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]