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++/10146] [3.4 regression] accepting invalid syntax "f.template foo()"


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=10146


giovannibajo@libero.it changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|rejects-valid               |accepts-invalid
   Last reconfirmed|0000-00-00 00:00:00         |2003-06-10 01:42:59
               date|                            |
            Summary|[3.4 regression] [new       |[3.4 regression] accepting
                   |parser] template function   |invalid syntax "f.template
                   |lookup failure(s)           |foo()"


------- Additional Comments From giovannibajo@libero.it  2003-06-10 01:42 -------
I gave another look to this PR. Today, the only bug I can see here is the 
following accepts-invalid:

--------------------------------
struct Foo 
{
    template <class U>
    void foo(U );
};

template <class T>
void func(void)
{
    Foo f;
    f.template foo(123);
}

int main()
{
    func<void>();
}
--------------------------------

which should be rejected because the keyword 'template' can be used only to 
qualify member template specializations (§14.2/4).

Everything else works as expected in mainline (3.4 CVS 20030603). I keep this 
bug open to track this little testcase here.


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