This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [C++ Patch] for c++/54537
- From: Fabien Chêne <fabien dot chene at gmail dot com>
- To: Jason Merrill <jason at redhat dot com>
- Cc: Paolo Carlini <paolo dot carlini at oracle dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>, libstdc++ at gcc dot gnu dot org
- Date: Wed, 22 May 2013 22:53:52 +0200
- Subject: Re: [C++ Patch] for c++/54537
- References: <CAFH4-dhvTpRyzTNpieNnZ=VMDcRE7+wikB4pk3dadFSNs0BK8g at mail dot gmail dot com> <504D3146 dot 8070108 at redhat dot com> <CAFH4-dgOgUEgzumgy891xVUieU2vugGxw2=_-_ezdpfXzZV7RQ at mail dot gmail dot com> <CAFH4-dhcjdoYkxb7gLygQBwv9S02Lue9zoRFE0SBLwemLAc-uQ at mail dot gmail dot com> <ff93ce3c-2523-42b9-b801-96e667058527 at email dot android dot com> <CAFH4-dhNT8LsqTBuQkRJO9HA+CAbmqQ44OA6PAUusWcn2cWoVg at mail dot gmail dot com> <a0f17889-3346-4ae9-80c6-28e7e5361f73 at email dot android dot com> <5058FFC4 dot 4020905 at oracle dot com> <50590293 dot 7050904 at oracle dot com> <50590676 dot 4090705 at oracle dot com> <CAFH4-dgRJz5+i4UxRSmGNXkKe6fKLq8Yezw5tosmHjA8tiw7DQ at mail dot gmail dot com> <505A1002 dot 3040200 at oracle dot com> <CAFH4-dj3ZQqhrJ93rxMg_z4eZryKRH+j_jsZ7_cX5Wx9E1BGGA at mail dot gmail dot com> <50A4099F dot 1080409 at oracle dot com> <50A40A7B dot 30809 at redhat dot com> <CAFH4-dgycCh=JbQ3MSnHE86FQ=bUjEQZdT8-h5371cwzQkQh0g at mail dot gmail dot com> <50A50028 dot 7060303 at redhat dot com>
Hi,
Again sorry for such a delay. Paolo subtly ping'ed me on DR39
(c++/13590), and I remember that this bug (c++/54537) was blocking the
patch I wrote last year for DR39.
2012/11/15 Jason Merrill <jason@redhat.com>:
[...]
> I was only thinking of the primary signature; putting
>
> extern "C" double pow (double, double);
>
> in any namespace will result in calling the C library function if that
> declaration is selected by overload resolution.
Ah, I see, it works. Then we end up with three solutions:
1) remove the pow(double,double) overload
2) add a specialization template <> pow(double,double)
3) add an extern "C" declaration to refer to the C library function
I don't have a strong preference, I would say that all solutions are
more or less equivalent. In the end, builtins are just reached in
different ways I guess, depending on the optimisations enabled.
Given that Paolo already OKed the solution 1), I would go for it.
Shall I commit if it still passes regtests ?
Thank you for your patience...
--
Fabien