what libc++ version introduced C++14 delete operators?

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

what libc++ version introduced C++14 delete operators?

Robinson, Paul via cfe-dev
Hi,

I hope this is the right place to ask:

What libc++ release version first had the C++14 new & delete operators (specifically, delete(void*, size_t))? I think they were introduced in svn rev. 229281 .

I'm interested in particular how one can test for presence of these functions, preferably with an actual linking step (aka autoconf test).

Thanks!

René
_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: what libc++ version introduced C++14 delete operators?

Robinson, Paul via cfe-dev
On Wed, Nov 8, 2017 at 10:48 AM, René J.V. Bertin via cfe-dev <[hidden email]> wrote:
Hi,

I hope this is the right place to ask:

What libc++ release version first had the C++14 new & delete operators (specifically, delete(void*, size_t))? I think they were introduced in svn rev. 229281 .

I'm interested in particular how one can test for presence of these functions, preferably with an actual linking step (aka autoconf test).

Rev 229281 was before we started updating _LIBCPP_VERSION to match the release.
An imperfect test would be checking _LIBCPP_VERSION and if it is greater than 1101, then it will have those calls.

This has two drawbacks:
* There will be versions of libc++ where _LIBCPP_VERSION == 1101 and the calls exist.
* There *may* be customized versions of libc++ where vendors have decided to not ship those calls. (I don't know of any, but ...).

-- Marshall



_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: what libc++ version introduced C++14 delete operators?

Robinson, Paul via cfe-dev
Marshall Clow via cfe-dev wrote:


Hi,

> An imperfect test would be checking _LIBCPP_VERSION and if it is greater
> than 1101, then it will have those calls.

Thanks, that's better than nothing.

> This has two drawbacks:
> * There will be versions of libc++ where _LIBCPP_VERSION == 1101 and the
> calls exist.

The application here is a GCC patch I'm working on (and off :)) to give it a -
stdlib=libstdc++|libc++ option. With older libc++ versions it appears to be
possible to use GCC's static libsupc++ as a source for the missing operators. I
presume that a trailing -lsupc++ linker argument will simply become a noop when
libc++ already provided all dependencies. To be confirmed of course (and sadly I
have no idea ATM how to write a test case.)

> * There *may* be customized versions of libc++ where vendors have decided
> to not ship those calls. (I don't know of any, but ...).

Why would vendors have done that? The only reason I can see is to allow a newer
libc++ to be used with older clang versions that provided the operators
implicitly, but such combinations shouldn't cause problems anyway, right?

R.

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: what libc++ version introduced C++14 delete operators?

Robinson, Paul via cfe-dev


On Tue, Dec 5, 2017 at 4:28 AM, René J. V. Bertin via cfe-dev <[hidden email]> wrote:
...
libc++ already provided all dependencies. To be confirmed of course (and sadly I
have no idea ATM how to write a test case.)

 
libc++ actually has a test suite that can be used on other compilers and it looks like someone's been running it against gcc.  You will find tests for those features in libcxx/test/.


_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: what libc++ version introduced C++14 delete operators?

Robinson, Paul via cfe-dev
Brian Cain via cfe-dev wrote:

> libc++ actually has a test suite that can be used on other compilers and it
> looks like someone's been running it against gcc.  You will find tests for
> those features in libcxx/test/.

Thanks, I'll have a look at those next time I come back to this lil' pet project
:)

R.

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev