Strange warning from ACLiC (or Cling)?


Hi,

In compiling my class NcAstrolab2.cxx within ROOT via ACLiC I get the following warning, which I didn’t see using gcc on the same system. I have attached the source files NcAstrolab2.h and NcAstrolab2.cxx as well as the ROOT macro test1.cc and the produced output file test1.txt (a renamed version of the original test1.log). Since gcc doesn’t issue such a warning, I guess that my code is standard C++ compliant and if so, how can I suppress this disturbing warning in ACliC, Or is it something I have to change in my code in view of newer compiler versions coming up ?

ncfs>root -b -q -e ‘gROOT->LoadMacro(“NcAstrolab2.cxx+”);’ test1.cc >test1.log
Info in TUnixSystem::ACLiC: creating shared library /ada_mnt/ada/user/nickve/test/NcGRB/alerts/./NcAstrolab2_cxx.so
In file included from /ada_mnt/ada/user/nickve/test/NcGRB/alerts/NcAstrolab2_cxx_ACLiC_dict.cxx:41:
/ada_mnt/ada/user/nickve/test/NcGRB/alerts/./NcAstrolab2.cxx: In copy constructor ‘NcAstrolab2::NcAstrolab2(const NcAstrolab2&)’:
/ada_mnt/ada/user/nickve/test/NcGRB/alerts/./NcAstrolab2.cxx:460:12: warning: implicitly-declared ‘NcPosition& NcPosition::operator=(const NcPosition&)’ is deprecated [-Wdeprecated-copy]
460 | fLabPos=t.fLabPos;
| ^~~~~~~
In file included from /ada_mnt/ada/user/nickve/test/NcGRB/alerts/./NcAstrolab2.h:36,
from /ada_mnt/ada/user/nickve/test/NcGRB/alerts/./NcAstrolab2.cxx:188,
from /ada_mnt/ada/user/nickve/test/NcGRB/alerts/NcAstrolab2_cxx_ACLiC_dict.cxx:41:
/ada_mnt/ada/software/icecube/nick/ncfs/ncfspack/source/NcPosition.h:22:3: note: because ‘NcPosition’ has user-provided ‘NcPosition::NcPosition(const NcPosition&)’
22 | NcPosition(const NcPosition& p); // Copy constructor
| ^~~~~~~~~~

Please read tips for efficient and successful posting and posting code

Please fill also the fields below. Note that root -b -q will tell you this info, and starting from 6.28/06 upwards, you can call .forum bug from the ROOT prompt to pre-populate a topic.


| Welcome to ROOT 6.34.02 https://root.cern |
| (c) 1995-2024, The ROOT Team; conception: R. Brun, F. Rademakers |
| Built for linuxx8664gcc on Jan 31 2025, 23:21:21 |
| From tags/6-34-02@6-34-02 |
| With g++ (GCC) 11.3.0 |

Try ‘.help’/‘.?’, ‘.demo’, ‘.license’, ‘.credits’, ‘.quit’/‘.q’

NcAstrolab2.cxx (645.2 KB)

NcAstrolab2.h (36.0 KB)

test1.cc (2.6 KB)

test1.txt (11.6 KB)


I guess @pcanal or @devajith can help.