cbalint13 opened a new pull request #6257: URL: https://github.com/apache/incubator-tvm/pull/6257
Proposed PR fixes the compiler warnings below. The fix is proposed in accord with discussions from [here](https://stackoverflow.com/questions/55318850/how-do-i-fix-this-warning-on-codeblocks-ide-warning-catching-polymorphic-type). ``` [ 27%] Building CXX object CMakeFiles/tvm.dir/src/printer/text_printer.cc.o /home/cbalint/work/TVM/tvm.marlann/src/parser/parser.cc: In member function ‘tvm::parser::Definitions tvm::parser::Parser::ParseDefinitions()’: /home/cbalint/work/TVM/tvm.marlann/src/parser/parser.cc:667:38: warning: catching polymorphic type ‘struct tvm::parser::DuplicateKeyError’ by value [-Wcatch-value=] 667 | } catch (DuplicateKeyError e) { | ^ /home/cbalint/work/TVM/tvm.marlann/src/parser/parser.cc: In member function ‘tvm::relay::TypeData tvm::parser::Parser::ParseTypeDef()’: /home/cbalint/work/TVM/tvm.marlann/src/parser/parser.cc:706:32: warning: catching polymorphic type ‘struct tvm::parser::DuplicateKeyError’ by value [-Wcatch-value=] 706 | } catch (DuplicateKeyError e) { | ^ /home/cbalint/work/TVM/tvm.marlann/src/parser/parser.cc: In lambda function: /home/cbalint/work/TVM/tvm.marlann/src/parser/parser.cc:750:40: warning: catching polymorphic type ‘struct tvm::parser::DuplicateKeyError’ by value [-Wcatch-value=] 750 | } catch (DuplicateKeyError e) { | ^ [ 28%] Building CXX object CMakeFiles/tvm.dir/src/printer/tir_hybrid_printer.cc.o /home/cbalint/work/TVM/tvm.marlann/src/parser/parser.cc: In member function ‘tvm::parser::Expr tvm::parser::Parser::GetOp(const string&, const tvm::parser::Token&)’: /home/cbalint/work/TVM/tvm.marlann/src/parser/parser.cc:1344:26: warning: catching polymorphic type ‘struct dmlc::Error’ by value [-Wcatch-value=] 1344 | } catch (dmlc::Error e) { ``` Used GCC compiler: ``` $ gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/10/lto-wrapper OFFLOAD_TARGET_NAMES=nvptx-none OFFLOAD_TARGET_DEFAULT=1 Target: x86_64-redhat-linux Configured with: ../configure --enable-bootstrap --enable-languages=c,c++,fortran,objc,obj-c++,ada,go,d,lto --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only --with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --with-isl --enable-offload-targets=nvptx-none --without-cuda-driver --enable-gnu-indirect-function --enable-cet --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 10.2.1 20200804 (Red Hat 10.2.1-2) (GCC) ``` ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected]
