public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/15711] New: unable to take address of function template specilization
@ 2004-05-29  2:21 chris at uzdavinis dot com
  2004-05-29  2:45 ` [Bug c++/15711] " pinskia at gcc dot gnu dot org
  0 siblings, 1 reply; 2+ messages in thread
From: chris at uzdavinis dot com @ 2004-05-29  2:21 UTC (permalink / raw)
  To: gcc-bugs

I expect the following to compile, but it gives a strange error, especially
considering the function is not overloaded and there is only one instantiation
of the template.

template<typename T>
void foo()
{
}

int main()
{
  &foo<int>;  //error: statement cannot resolve address of overloaded function
}




$ g++ -v -save-temps test.cpp 2>&1 | grep -v ignoring
Reading specs from /usr/local/gcc-3.4.0/bin/../lib/gcc/i686-pc-linux-gnu/3.4.0/specs
Configured with: ./configure
--prefix=/home/coryan/HEAD/specs/BUILD//usr/local/gcc-3.4.0 --enable-threads
Thread model: posix
gcc version 3.4.0
 /usr/local/gcc-3.4.0/bin/../libexec/gcc/i686-pc-linux-gnu/3.4.0/cc1plus -E
-quiet -v -iprefix /usr/local/gcc-3.4.0/bin/../lib/gcc/i686-pc-linux-gnu/3.4.0/
-D_GNU_SOURCE test.cpp -mtune=pentiumpro -o test.ii
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/gcc-3.4.0/bin/../lib/gcc/i686-pc-linux-gnu/3.4.0/../../../../include/c++/3.4.0
 /usr/local/gcc-3.4.0/bin/../lib/gcc/i686-pc-linux-gnu/3.4.0/../../../../include/c++/3.4.0/i686-pc-linux-gnu
 /usr/local/gcc-3.4.0/bin/../lib/gcc/i686-pc-linux-gnu/3.4.0/../../../../include/c++/3.4.0/backward
 /usr/local/gcc-3.4.0/bin/../lib/gcc/i686-pc-linux-gnu/3.4.0/include
 /usr/local/include
 /usr/include
End of search list.
 /usr/local/gcc-3.4.0/bin/../libexec/gcc/i686-pc-linux-gnu/3.4.0/cc1plus
-fpreprocessed test.ii -quiet -dumpbase test.cpp -mtune=pentiumpro -auxbase test
-version -o test.s
GNU C++ version 3.4.0 (i686-pc-linux-gnu)
        compiled by GNU C version 3.4.0.
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
test.cpp: In function `int main()':
test.cpp:8: error: statement cannot resolve address of overloaded function

-- 
           Summary: unable to take address of function template
                    specilization
           Product: gcc
           Version: 3.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: chris at uzdavinis dot com
                CC: gcc-bugs at gcc dot gnu dot org,pbrannan at atdesk dot
                    com
 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=15711


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

* [Bug c++/15711] unable to take address of function template specilization
  2004-05-29  2:21 [Bug c++/15711] New: unable to take address of function template specilization chris at uzdavinis dot com
@ 2004-05-29  2:45 ` pinskia at gcc dot gnu dot org
  0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-05-29  2:45 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-05-28 18:49 -------
This is a dup of bug 11407, which used to be suspended because the standard was not clear and a DR 
report was filed and it was found to be a real defect. 

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

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |DUPLICATE


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


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

end of thread, other threads:[~2004-05-28 18:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-05-29  2:21 [Bug c++/15711] New: unable to take address of function template specilization chris at uzdavinis dot com
2004-05-29  2:45 ` [Bug c++/15711] " 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).