Skip to content

perf_annotation_test fails to compile under gcc8 #3680

@evantorrie

Description

@evantorrie

bazel test //test/common/common:perf_annotation_test fails when compiling under gcc8 with a

bazel-out/k8-fastbuild/bin/source/common/common/_virtual_includes/perf_annotation_lib/common/common/perf_annotation.h:33:54: error: unnecessary parentheses in declaration of 'perf' [-Werror=parentheses]
 #define PERF_OPERATION(perf_var) Envoy::PerfOperation(perf_var)
                                                      ^
test/common/common/perf_annotation_test.cc:24:3: note: in expansion of macro 'PERF_OPERATION'
   PERF_OPERATION(perf);
   ^~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors
Target //test/common/common:perf_annotation_test failed to build

GCC

$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/8/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,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-libmpx --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
gcc version 8.1.1 20180502 (Red Hat 8.1.1-1) (GCC) 

Commit: 4521e89

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions