[CLN-list] Getting a build error

Richard B. Kreckel kreckel at in.terlu.de
Wed Apr 14 09:36:42 CEST 2021


Hi Phil,

On 12.04.21 15:37, Philip Huffman via CLN-list wrote:
>     libtool: compile:  g++ -std=gnu++11 -DHAVE_CONFIG_H -I. -I../autoconf -I../include -I../src -I../include -I../src -g -O2 -MT base/low/cl_low_div.lo -MD -MP -MF base/low/.deps/cl_low_div.Tpo -c base/low/cl_low_div.cc -fno-common -DPIC -o base/low/.libs/cl_low_div.o
>     base/low/cl_low_div.cc:13:8: error: declaration of 'divu_16_rest' in global scope conflicts with declaration with C language linkage
>     uint16 divu_16_rest;
>            ^
>     ./base/cl_low.h:447:21: note: declared with C language linkage here
>       extern "C" uint16 divu_16_rest;                         // -> Rest r

According to my reading of the C++ standard, this definition in global
scope within cl_low_div.cc:

  uint16 divu_16_rest;

can be well declared extern "C" within namespace scope (as done in
cl_low.h), as long as it corresponds to the same entity (which it does).



So, is this some compiler bug? Can you, please, apply this attached
patch and see if it works?
 (Admittedly, it is a stab in the dark.)

Also, please provide the output of g++ --version. Thanks.


 -richard.

-- 
Richard B. Kreckel
<https://in.terlu.de/~kreckel/>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch4phil.patch
Type: text/x-patch
Size: 1076 bytes
Desc: not available
URL: <http://www.ginac.de/pipermail/cln-list/attachments/20210414/b3ec5eb6/attachment.bin>


More information about the CLN-list mailing list