]> www.ginac.de Git - cln.git/commit
Fix linking errors on some compilers.
authorRichard Kreckel <kreckel@ginac.de>
Thu, 4 Nov 2021 10:25:23 +0000 (11:25 +0100)
committerRichard Kreckel <kreckel@ginac.de>
Thu, 4 Nov 2021 20:21:23 +0000 (21:21 +0100)
commit6edafa136be9f6394fea46a3e2858fe9194974fd
tree60b159093444c7319f909b370f1818b65620f0d7
parentd1893bec9ff29422da5e1aedbd4a5ade49405fcf
Fix linking errors on some compilers.

Let's be explicit about variables with C language linkage [dcl.link]:
- 'type x;' declares and defines C++ variable 'x'.
- 'extern "C" type x;' declares 'x' (with C linkage).
- 'extern "C" { type x; }' declares and defines 'x'.
The C++ standard allows mixed declarations as long as they denote the
same entity, but some compilers (e.g. CLang) don't seem to comply.
It doesn't hurt to be explicit and use extern "C" throughout for the
affected variables.

Reported by Philip Huffman <philhuffman56@icloud.com>.
src/base/low/cl_low_div.cc
src/base/low/cl_low_mul.cc