[LAD] G++ trouble
contact at alexandredenis.net
Mon Nov 16 10:37:46 CET 2020
On Mon, 16 Nov 2020 09:43:42 +0100
Fons Adriaensen <fons at linuxaudio.org> wrote:
> Hello all,
> I'm having a strange problem with G++...
> In one source file 'fb3data.cc', I define arrays like this:
> const float svcoeff44  =
> 1.631996e-03, 6.335480e-02, ...
> /usr/bin/ld: filtbank3.o: warning: relocation against `svcoeff88'
> read-only section `.text'
I've already seen this strange behavior with gcc 9.x : symbols with
a const definition are by default not publicly visible. It works
if you explicitly add an "extern" in the definition:
extern const float svcoeff44  = (...)
I am not sure whether it is a bug in gcc or a strict application of the
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 488 bytes
Desc: OpenPGP digital signature
More information about the Linux-audio-dev