https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61987
--- Comment #7 from Yuanming Gao ---
Please read the book: <>. The code comes from <<7.1
Templates>>. The author thought the function int foo(int) must be selected.
Visual C++ can select the int foo(int) correctly. I don't know whether it is an
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61987
--- Comment #6 from Yuanming Gao ---
Visual C++ can select the int foo(int) correctly. I don't know whether it is
an implementation issue, or it is by design.
Best regards,
Yuanming
> From: gcc-bugzi...@gcc.gnu.org
> To: gaoyuanm...@hotmail.co
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61987
--- Comment #3 from Yuanming Gao ---
Please read the book: <>. The code comes from <<7.1
Templates>>. The author thought the function int foo(int) must be selected.
Best regards,
Yuanming Gao
> From: gcc-bugzi...@gcc.gnu.org
> To: gaoyuanm...@
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61987
--- Comment #1 from Yuanming Gao ---
Created attachment 33223
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33223&action=edit
source code
++
Assignee: unassigned at gcc dot gnu.org
Reporter: gaoyuanming at hotmail dot com
Created attachment 33222
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33222&action=edit
Assembly code
I compiled the piece of code:
#include
int foo(double d) { return static_cast(d); }
t