[openssl-dev] [openssl.org #4473] Compile errors when compiling with C++ compiler
noloader at gmail.com
Thu Mar 24 01:38:19 UTC 2016
On Wed, Mar 23, 2016 at 8:32 PM, Rich Salz via RT <rt at openssl.org> wrote:
> You can link C++ against openssl API because of the extern C wrapper we use.
That's what I was on my way to testing.
> You cannot compile openssl with a C++ compiler. Closing ticket. (The days of
> "C++ is a better C" went away a long long time ago.)
I don't want to speak out of turn, but this might be setting up users
for years of pain an misery. It might also discard some analysis that
could be beneficial to the project.
The only problem I have not been able to fix when swapping C++
compiler for a C compiler is code that uses OFFSETOF macro, which it
does not appear OpenSSL is using:
$ grep -R OFFSETOF *
Nearly everything else I have encountered is trivially fixed, like the
cast. Since the C++ compiler is a better with respect to type safety,
it seems like its providing valuable analysis services.
I guess to put it another way, discarding it because of colloquial
like "C++ is a better C" is cutting off your nose to spite your face.
The configuration should only be avoided/abandoned due to technical
reasons, and not philosophical principals.
More information about the openssl-dev