Thank you for your Answer. I used ca(aaa) instead of ca{aaa} and compile error was solved! but, next error occurred like below ../compiler/llvm-mali/include/llvm/Mali/MaliDataFlowFramework.h:288:21: error: expected ‘,’ before ‘...’ token [this, &args...](const MachineBasicBlock *MBB, const VarTy &, ^ ../compiler/llvm-mali/include/llvm/Mali/MaliDataFlowFramework.h:288:21: error: expected identifier before ‘...’ token ../compiler/llvm-mali/include/llvm/Mali/MaliDataFlowFramework.h:288:24: error: parameter packs not expanded with ‘...’: [this, &args...](const MachineBasicBlock *MBB, const VarTy &, In this case, It appears to be caused by the lambda variable argument(`...`) Is this problem same cause(C++11 core bug)? If so, it maybe be difficult to use gcc 4.8 Because previous error can be solved by doing workaround( ca{aaa} to ca(aaa) ) But, I think that this issue don't have workaround.... because, the cause of this issue is syntax. -----Original Message----- From: "Jonathan Wakely"<jwakely.gcc@xxxxxxxxx> To: "김륜현"<winxp4333@xxxxxxxxx>; Cc: "gcc-help"<gcc-help@xxxxxxxxxxx>; Sent: 2021-08-31 (화) 17:25:32 (GMT+09:00) Subject: Re: C++ delete function compile error occurs from difference between gcc 4.8.2 and 4.9.4 On Tue, 31 Aug 2021 at 09:24, Jonathan Wakely <jwakely.gcc@xxxxxxxxx> wrote: > > On Tue, 31 Aug 2021 at 08:11, 김륜현 via Gcc-help <gcc-help@xxxxxxxxxxx> wrote: > > > > 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. > > There was a defect report against the C++11 standard, which was > implemented in GCC 4.9 but not in GCC 4.8: > https://wg21.link/cwg1288 > > So the code is relying on a feature which was not actually supported > in the original C++11 standard. You can work around it by using > ca(aaa) instead of ca{aaa}. That compiles with GCC 4.8 and all later > versions. The change to implement the defect report in GCC 4.9 was https://gcc.gnu.org/r207164