Re: Transitioning libgomp from C to C++ implementation

Arsen Arsenović <[email protected]>
Newsgroups gmane.comp.gcc.devel
Organization BayLibre
Message-ID <[email protected]>
Martin Uecker <[email protected]> writes:

> I am not convinced that moving to C++ actually makes code more
> type safe or otherwise better.  

It certainly does, by providing a way to implement type-safe containers
for instance, and by providing generic mechanisms of initialization and
cleanup.

These do not require the standard library to be benefited from, even.

> I am not working on libgomp, so my opinion may not be important.
> But  for libraries such libubsan I observe that people created 
> alternatives in C so having a C version would generally be more
> useful. 

That's a strange choice, given that all compilers that implement ubsan
also implement C++ (to my awareness).

Perhaps there are other factors at play, such as libsanitizer not being
possible to compile in a given environment.

Indeed, that's why e.g. Managarm has a C++ reimplementation of libubsan
and friends for its kernel:
https://github.com/managarm/managarm/blob/master/kernel/thor/generic/ubsan.cpp
-- 
Arsen Arsenović
signature.asc (application/pgp-signature, 430 B)
-----BEGIN PGP SIGNATURE-----

iQEKBAEWCgCyFiEE/uKz0RP8AKMWLWBhUsKUMB6ixJMFAmn9o2obFIAAAAAABAAO
bWFudTIsMi41KzEuMTIsMiwyXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25z
Lm9wZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRGRUUyQjNEMTEzRkMwMEEzMTYyRDYw
NjE1MkMyOTQzMDFFQTJDNDkzGBxhYXJzZW5vdmljQGJheWxpYnJlLmNvbQAKCRBS
wpQwHqLEkzRGAP9B/7Jty9CXTr2i8EyxPy1SRSQdSB9zwkWp/y8BArgykAD/apKw
keoho3QLl/U51K+ncSbCLarzbrwJ6IMekC8H1gc=
=cGfk
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.