[Bug 718633] New: g++ sometimes treats a reference to a non-overloaded template function as overloaded
https://bugzilla.novell.com/show_bug.cgi?id=718633 https://bugzilla.novell.com/show_bug.cgi?id=718633#c0 Summary: g++ sometimes treats a reference to a non-overloaded template function as overloaded Classification: openSUSE Product: openSUSE 11.4 Version: Final Platform: Other OS/Version: Other Status: NEW Severity: Major Priority: P5 - None Component: Documentation AssignedTo: ke@suse.com ReportedBy: giecrilj@stegny.2a.pl QAContact: ke@suse.com Found By: --- Blocker: --- User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:6.0.2) Gecko/20100101 Firefox/6.0.2 The function foo < void > below is unambiguously defined; however, GNU C++ requires an information about its type in order to evaluate a reference to it. Reproducible: Always Steps to Reproduce: 1. { cat <<'/* EOF */' >overloaded.cpp && g++ overloaded.cpp; } template < class T > void foo () { } void bar () {} void (*good ()) () { return bar; return foo < void >; } int bad () { return !bar; return !foo < void >; } /* EOF */ Actual Results: 1. overloaded.cpp: In function ‘int bad()’: overloaded.cpp:9:9: error: cannot resolve overloaded function ‘foo’ based on conversion to type ‘bool’ overloaded.cpp:9:9: error: in argument to unary ! Expected Results: 1. link error: undefined reference to symbol 'main' Thank you for testing your code with Comeau C/C++! Tell others about http://www.comeaucomputing.com/tryitout ! Your Comeau C/C++ test results are as follows: Comeau C/C++ 4.3.10.1 (Oct 6 2008 11:28:09) for ONLINE_EVALUATION_BETA2 Copyright 1988-2008 Comeau Computing. All rights reserved. MODE:strict errors C++ C++0x_extensions "ComeauTest.c", line 5: warning: statement is unreachable return foo < void >; ^ "ComeauTest.c", line 8: warning: controlling expression is constant return !bar; ^ "ComeauTest.c", line 9: warning: statement is unreachable return !foo < void >; ^ "ComeauTest.c", line 9: warning: controlling expression is constant return !foo < void >; ^ In strict mode, with -tused, Compile succeeded (but remember, the Comeau online compiler does not link). -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=718633 https://bugzilla.novell.com/show_bug.cgi?id=718633#c Karl Eichwalder <ke@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Component|Documentation |Development AssignedTo|ke@suse.com |pth@suse.com QAContact|ke@suse.com |qa@suse.de -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=718633 https://bugzilla.novell.com/show_bug.cgi?id=718633#c Ihno Krumreich <ihno@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ihno@suse.com OS/Version|Other |openSUSE 11.4 -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=718633 https://bugzilla.novell.com/show_bug.cgi?id=718633#c Philipp Thomas <pth@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |pth@suse.com AssignedTo|pth@suse.com |rguenther@suse.com -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=718633 https://bugzilla.novell.com/show_bug.cgi?id=718633#c1 Richard Guenther <rguenther@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |UPSTREAM --- Comment #1 from Richard Guenther <rguenther@suse.com> 2011-11-02 11:32:14 UTC --- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50961 Please consider filing bugs upstream to save us some work. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=718633 https://bugzilla.novell.com/show_bug.cgi?id=718633#c2 --- Comment #2 from Christopher Yeleighton <giecrilj@stegny.2a.pl> 2011-11-02 11:45:31 UTC --- 12.2 How and where to Report Bugs Bugs should be reported to the bug database at `http://bugs.opensuse.org/'. <URL: info:/gcc-4.5/Bug%20Reporting > -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com