C++ delete function compile error occurs from difference between gcc 4.8.2 and 4.9.4

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dear Sir,
Hi, I tried to compile my source code using gcc-linaro-aarch64-linux-gnu-4.8-2013.09-01_linux(gcc 4.8.2)
the error occurred like below
 
../compiler/llvm-mali/lib/Target/Bifrost/BifrostInstrInfo.h:56:47: error: use of deleted function ‘llvm::MachineInstr::MachineInstr(const llvm::MachineInstr&)’
     PipeInfoTy(const MachineInstr &mi) : MI{mi} {}
                                               ^
In file included from ../compiler/llvm-mali/lib/Target/Bifrost/MCTargetDesc/BifrostMCInstOpdMap.h:18:0,
                 from ../compiler/llvm-mali/lib/Target/Bifrost/MCTargetDesc/BifrostMCInst.h:14,
                 from ../compiler/llvm-mali/lib/Target/Bifrost/BifrostRegisterInfo.h:12,
                 from ../compiler/llvm-mali/lib/Target/Bifrost/BifrostFrameLowering.h:13,
                 from ../compiler/llvm-mali/lib/Target/Bifrost/BifrostSubtarget.h:12,
                 from ../compiler/llvm-mali/lib/Target/Bifrost/BifrostISelDAGToDAG.h:13,
                 from ../compiler/llvm-mali/lib/Target/Bifrost/BifrostISelDAGToDAG.cpp:11:
../compiler/llvm/llvm/include/llvm/CodeGen/MachineInstr.h:276:3: error: declared here
   MachineInstr(const MachineInstr &) = delete;
   ^
In file included from ../compiler/llvm-mali/lib/Target/Bifrost/BifrostSubtarget.h:14:0,
                 from ../compiler/llvm-mali/lib/Target/Bifrost/BifrostISelDAGToDAG.h:13,
                 from ../compiler/llvm-mali/lib/Target/Bifrost/BifrostISelDAGToDAG.cpp:11:
../compiler/llvm-mali/lib/Target/Bifrost/BifrostInstrInfo.h:56:47: error: use of deleted function ‘llvm::MachineInstr::~MachineInstr()’
     PipeInfoTy(const MachineInstr &mi) : MI{mi} {}
                                               ^
In file included from ../compiler/llvm-mali/lib/Target/Bifrost/MCTargetDesc/BifrostMCInstOpdMap.h:18:0,
                 from ../compiler/llvm-mali/lib/Target/Bifrost/MCTargetDesc/BifrostMCInst.h:14,
                 from ../compiler/llvm-mali/lib/Target/Bifrost/BifrostRegisterInfo.h:12,
                 from ../compiler/llvm-mali/lib/Target/Bifrost/BifrostFrameLowering.h:13,
                 from ../compiler/llvm-mali/lib/Target/Bifrost/BifrostSubtarget.h:12,
                 from ../compiler/llvm-mali/lib/Target/Bifrost/BifrostISelDAGToDAG.h:13,
                 from ../compiler/llvm-mali/lib/Target/Bifrost/BifrostISelDAGToDAG.cpp:11:
../compiler/llvm/llvm/include/llvm/CodeGen/MachineInstr.h:279:3: error: declared here
   ~MachineInstr() = delete;
 
Here, I attach the code that i simply reconstructed for the private of the real code
 
Please refer to below code for understanding error log
(Assume AAA to MachineInstr / ZZZ to PipeInfoTy)
 
#include <iostream>
using namespace std;
 
class AAA {
public:
    AAA(const AAA &) = delete;
    AAA &operator=(const AAA &) = delete;
    ~AAA() = delete;
};
 
class ZZZ {
    const AAA &ca;
 
public:
    ZZZ (const AAA &aaa) : ca{aaa} {}
};
 
int main()
{
 
}
 
 
I was looking for the solution and eventually changed the toolchain to gcc-linaro-4.9-2016.02-x86_64_aarch64-linux-gnu(gcc4.9.4)
 
and I tried again. build was success.
 
Build was successful and I read the gcc release note and compile option for checking cause
 
But i don't know what the difference is.
 
I want to know cause clearly.
 
Could you explain the difference? or let me know the solution this issue in gcc4.8(ex compile option... etc)




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux