quickstep-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marc Spehlmann <spehl.apa...@gmail.com>
Subject compiler warnings- anyone seen this?
Date Tue, 13 Sep 2016 01:28:41 GMT
I get annoying compiler warnings upgraded to errors when building with
clang 3.8, bison 3.0.4, flex 2.6.0:

[3/170] Building CXX object
parser/CMakeFiles/quickstep_parser_SqlLexer.dir/SqlLexer_gen.cpp.o
FAILED: parser/CMakeFiles/quickstep_parser_SqlLexer.dir/SqlLexer_gen.cpp.o
ccache /usr/bin/clang++-3.8
-DQUICKSTEP_ENABLE_VECTOR_COPY_ELISION_SELECTION
-DQUICKSTEP_ENABLE_VECTOR_PREDICATE_SHORT_CIRCUIT -DYY_NO_UNISTD_H
-D_ISOC11_SOURCE -I../ -I. -isystem ../third_party/protobuf/src -isystem
../third_party/googletest/googletest/include
-I../third_party/benchmark/include -Ithird_party/gflags/include
-I../third_party/glog/src -Ithird_party -I../third_party/re2
-I../third_party/tmb/include
-I../third_party/protobuf_cmake/../protobuf/src -std=c++14
-Wno-tautological-compare -Wall -pedantic -Werror -Wno-extended-offsetof
-march=native -Wno-return-type-c-linkage   -Wno-sign-compare -MMD -MT
parser/CMakeFiles/quickstep_parser_SqlLexer.dir/SqlLexer_gen.cpp.o -MF
parser/CMakeFiles/quickstep_parser_SqlLexer.dir/SqlLexer_gen.cpp.o.d -o
parser/CMakeFiles/quickstep_parser_SqlLexer.dir/SqlLexer_gen.cpp.o -c
parser/SqlLexer_gen.cpp
/home/marc/workspace/incubator-quickstep/build/parser/SqlLexer_gen.cpp:1370:84:
error: implicit conversion of NULL constant to 'bool'
[-Werror,-Wnull-conversion]
  if ( ! ( yyg->yy_buffer_stack ?
yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] : __null) ) {
       ~
        ^~~~~~

       false
[... condensed because there were a total of 12]

/home/marc/workspace/incubator-quickstep/build/parser/SqlLexer_gen.cpp:3494:82:
error: implicit conversion of NULL constant to 'bool'
[-Werror,-Wnull-conversion]
 while(( yyg->yy_buffer_stack ?
yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] : __null)){
 ~~~~~
      ^~~~~~

     false
12 errors generated.

The way I have been getting around this is to add set(CMAKE_CXX_FLAGS
"${CMAKE_CXX_FLAGS} -Wno-null-conversion") to the CMakeLists.txt

Anyone have a better way?

-Marc

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message