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]

c++/2861: Parser crashes while parsing a call a template function using the template keyword



>Number:         2861
>Category:       c++
>Synopsis:       Parser crashes while parsing a call a template function using the template keyword
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          ice-on-legal-code
>Submitter-Id:   net
>Arrival-Date:   Thu May 17 21:26:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Amitabh Nene
>Release:        gcc version 3.0 20010516 (prerelease)
>Organization:
>Environment:
Linux 2.2.16-22enterprise #1 SMP Tue Aug 22 16:29:32 EDT 2000 i686 unknown
>Description:
g++bug.cpp: In function `int main()':
g++bug.cpp:10: Internal error #980519.
g++bug.cpp:10: Internal compiler error in build_member_call, at cp/init.c:1523
Please submit a full bug report, with preprocessed source if appropriate.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
>How-To-Repeat:
namespace Foo
{
    template<typename _T>
    void test() {
    }
}

int main()
{
    Foo::template test<int>();
}
>Fix:
Workaround is to use Foo::test<int>(), instead of 
Foo::template test<int>

However the other proprietary compiler I am using ALWAYS needs
the template keyword, hence its a severe bug for me from a code
management perspective (last thing i want is #ifdefs)
>Release-Note:
>Audit-Trail:
>Unformatted:


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