[Bug c++/5458] address of overloaded template function as argument for template
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=5458 Jason Merrill changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |INVALID Known to fail|4.2.0 | --- Comment #18 from Jason Merrill --- The compiler is following the standard. C++11 and up say, When P is a function type, pointer to function type, or pointer to member function type: — If the argument is an overload set containing one or more function templates, the parameter is treated as a non-deduced context. — If the argument is an overload set (not containing function templates), trial argument deduction is attempted using each of the members of the set. If deduction succeeds for only one of the overload set members, that member is used as the argument value for the deduction. If deduction succeeds for more than one member of the overload set the parameter is treated as a non-deduced context. So indeed, adding a function template to the overload set means no deduction is done, according to the first bullet. -- You are receiving this mail because: You are on the CC list for the bug.
[Bug c++/14710] Warning about useless casts
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14710 --- Comment #8 from Jason Merrill 2012-03-14 18:00:33 UTC --- I wouldn't warn about a cast that changes the type or value category of an expression at all, or a cast that ends up being the same type as the result of template instantiation. But a warning for (A*)&a seems reasonable. -- Configure bugmail: http://gcc.gnu.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You reported the bug. -- To UNSUBSCRIBE, email to debian-gcc-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/bug-14710-5724-vl9vopn...@http.gcc.gnu.org/bugzilla/
[Bug c++/14710] Warning about useless casts
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14710 --- Comment #12 from Jason Merrill --- Author: jason Date: Wed Feb 26 21:28:08 2014 New Revision: 208183 URL: http://gcc.gnu.org/viewcvs?rev=208183&root=gcc&view=rev Log: PR c++/59231 PR c++/11586 PR c++/14710 PR c++/57132 gcc/ * c-common.c (shorten_compare): Don't check c_inhibit_evaluation_warnings. gcc/cp/ * pt.c (struct warning_sentinel): New. (tsubst_copy_and_build): Use it instead of c_inhibit_evaluation_warnings. Added: trunk/gcc/testsuite/g++.dg/warn/Wsign-compare-7.C Modified: trunk/gcc/c-family/ChangeLog trunk/gcc/c-family/c-common.c trunk/gcc/cp/ChangeLog trunk/gcc/cp/pt.c trunk/gcc/cp/typeck.c trunk/gcc/testsuite/g++.dg/cilk-plus/AN/array_test2_tplt.cc trunk/gcc/testsuite/g++.dg/cpp0x/overflow1.C -- You are receiving this mail because: You reported the bug. -- To UNSUBSCRIBE, email to debian-gcc-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/bug-14710-5724-bxbijhk...@http.gcc.gnu.org/bugzilla/