public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/23088] New: gcc 4.0.1 rejects non-ambiguous member-template call
@ 2005-07-26 21:30 nicoara at roguewave dot com
  2005-07-26 21:30 ` [Bug c++/23088] gcc " pinskia at gcc dot gnu dot org
  2005-07-26 21:39 ` [Bug c++/23088] gcc 4.0.1 " nicoara at roguewave dot com
  0 siblings, 2 replies; 3+ messages in thread
From: nicoara at roguewave dot com @ 2005-07-26 21:30 UTC (permalink / raw)
  To: gcc-bugs

The following code:

$ cat > t.cpp << EOF

struct A
{
    template<class T> 
    T get () {
        return T();
    }
};

template<class T>
T foo ()
{
    A a;
    return a.get<T> ();
}

int main ()
{
    return foo<int> ();
}

EOF

fails to compile:

$ g++ -c t.cpp
t.cpp: In function `T foo()':
t.cpp:13: error: parse error before `>' token

with:

$ gcc -v
Reading specs from /usr/lib/gcc-lib/i486-slackware-linux/3.3.4/specs
Configured with: ../gcc-3.3.4/configure --prefix=/usr --enable-shared
--enable-threads=posix --enable-__cxa_atexit --disable-checking --with-gnu-ld
--verbose --target=i486-slackware-linux --host=i486-slackware-linux
Thread model: posix
gcc version 3.3.4

-- 
           Summary: gcc 4.0.1 rejects non-ambiguous member-template call
           Product: gcc
           Version: 4.0.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: nicoara at roguewave dot com
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i486-slackware-linux
  GCC host triplet: i486-slackware-linux
GCC target triplet: i486-slackware-linux


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


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

* [Bug c++/23088] gcc rejects non-ambiguous member-template call
  2005-07-26 21:30 [Bug c++/23088] New: gcc 4.0.1 rejects non-ambiguous member-template call nicoara at roguewave dot com
@ 2005-07-26 21:30 ` pinskia at gcc dot gnu dot org
  2005-07-26 21:39 ` [Bug c++/23088] gcc 4.0.1 " nicoara at roguewave dot com
  1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-07-26 21:30 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-07-26 21:30 -------
If you noticed you are using 3.3.x and not 4.0.x.

This is a dup of bug 795 anyways.

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

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |DUPLICATE
            Summary|gcc 4.0.1 rejects non-      |gcc rejects non-ambiguous
                   |ambiguous member-template   |member-template call
                   |call                        |
            Version|4.0.1                       |3.3.4


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


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

* [Bug c++/23088] gcc 4.0.1 rejects non-ambiguous member-template call
  2005-07-26 21:30 [Bug c++/23088] New: gcc 4.0.1 rejects non-ambiguous member-template call nicoara at roguewave dot com
  2005-07-26 21:30 ` [Bug c++/23088] gcc " pinskia at gcc dot gnu dot org
@ 2005-07-26 21:39 ` nicoara at roguewave dot com
  1 sibling, 0 replies; 3+ messages in thread
From: nicoara at roguewave dot com @ 2005-07-26 21:39 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From nicoara at roguewave dot com  2005-07-26 21:34 -------
I am sorry for the confusion, a mismatch between multiple versions of gcc led me
to believe this was still a bug in 4.0.1. :-(

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|gcc rejects non-ambiguous   |gcc 4.0.1 rejects non-
                   |member-template call        |ambiguous member-template
                   |                            |call
            Version|3.3.4                       |4.0.1


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


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

end of thread, other threads:[~2005-07-26 21:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-07-26 21:30 [Bug c++/23088] New: gcc 4.0.1 rejects non-ambiguous member-template call nicoara at roguewave dot com
2005-07-26 21:30 ` [Bug c++/23088] gcc " pinskia at gcc dot gnu dot org
2005-07-26 21:39 ` [Bug c++/23088] gcc 4.0.1 " nicoara at roguewave dot com

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).