public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/14878] New: Fails to parse call to template function
@ 2004-04-07 14:30 v dot lesk at imperial dot ac dot uk
  2004-04-07 15:02 ` [Bug c++/14878] " pinskia at gcc dot gnu dot org
  0 siblings, 1 reply; 2+ messages in thread
From: v dot lesk at imperial dot ac dot uk @ 2004-04-07 14:30 UTC (permalink / raw)
  To: gcc-bugs

#include<iostream>

using namespace std;


class A
{
public:
  template<typename T>
  T f(void){T result = 0; return result;}
};

template<typename T>
class B
{
public:
  T g(void){A a;return a.f<T>();}           // this line is changed
};


int main(void)
{
  B<int>b;
  cout<<b.g()<<endl;

  return 0;
}

//Error:
//a.C: In member function `T B<T>::g()':
//a.C:17: error: parse error before `;' token

-- 
           Summary: Fails to parse call to template function
           Product: gcc
           Version: 3.3.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: v dot lesk at imperial dot ac dot uk
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug c++/14878] Fails to parse call to template function
  2004-04-07 14:30 [Bug c++/14878] New: Fails to parse call to template function v dot lesk at imperial dot ac dot uk
@ 2004-04-07 15:02 ` pinskia at gcc dot gnu dot org
  0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-04-07 15:02 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-04-07 15:02 -------
This is a dup of one of the most reported bugs, PR 795.  This is fixed in 3.4.0 already (which is going to 
be released in the next few weeks).

*** This bug has been marked as a duplicate of 795 ***

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |DUPLICATE
   Target Milestone|---                         |3.4.0


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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-04-07 15:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-04-07 14:30 [Bug c++/14878] New: Fails to parse call to template function v dot lesk at imperial dot ac dot uk
2004-04-07 15:02 ` [Bug c++/14878] " pinskia at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).