Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix newer GCC compiler warnings. #6257

Merged
merged 1 commit into from
Aug 12, 2020
Merged

Fix newer GCC compiler warnings. #6257

merged 1 commit into from
Aug 12, 2020

Conversation

cbalint13
Copy link
Contributor

@cbalint13 cbalint13 commented Aug 12, 2020

Proposed PR fixes the compiler warnings below.

[ 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) 

@jroesch, please help with the review.

Thank You !

@tqchen tqchen merged commit 72b3808 into apache:master Aug 12, 2020
@tqchen
Copy link
Member

tqchen commented Aug 12, 2020

Thanks @cbalint13 !

wjliu1998 pushed a commit to wjliu1998/incubator-tvm that referenced this pull request Aug 13, 2020
trevor-m pushed a commit to trevor-m/tvm that referenced this pull request Aug 26, 2020
trevor-m pushed a commit to trevor-m/tvm that referenced this pull request Aug 26, 2020
trevor-m pushed a commit to trevor-m/tvm that referenced this pull request Aug 26, 2020
trevor-m pushed a commit to trevor-m/tvm that referenced this pull request Sep 2, 2020
trevor-m pushed a commit to neo-ai/tvm that referenced this pull request Sep 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants