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

Build error: error: ISO C++ forbids compound-literals [-Werror=pedantic] #39

Open
barracuda156 opened this issue Nov 12, 2024 · 0 comments

Comments

@barracuda156
Copy link
Contributor

[ 16%] Building CXX object tests/CMakeFiles/tests.dir/test_bt.cpp.o
cd /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_net_oxenc/oxenc/work/build/tests && /opt/local/bin/ccache /opt/local/bin/g++-mp-14  -I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_net_oxenc/oxenc/work/oxen-encoding-1.1.0 -isystem /opt/local/include -pipe -Os -DNDEBUG -I/opt/local/include -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++20 -mmacosx-version-min=10.6 -Wall -Wextra -Wconversion -Wpedantic -Wcast-align -Wunused -Werror -MD -MT tests/CMakeFiles/tests.dir/test_bt.cpp.o -MF CMakeFiles/tests.dir/test_bt.cpp.o.d -o CMakeFiles/tests.dir/test_bt.cpp.o -c /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_net_oxenc/oxenc/work/oxen-encoding-1.1.0/tests/test_bt.cpp
. . .
In file included from /opt/local/include/catch2/benchmark/catch_benchmark.hpp:14,
                 from /opt/local/include/catch2/benchmark/catch_benchmark_all.hpp:24,
                 from /opt/local/include/catch2/catch_all.hpp:25,
                 from /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_net_oxenc/oxenc/work/oxen-encoding-1.1.0/tests/common.h:2,
                 from /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_net_oxenc/oxenc/work/oxen-encoding-1.1.0/tests/test_bt.cpp:5:
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_net_oxenc/oxenc/work/oxen-encoding-1.1.0/tests/test_bt.cpp: In function 'void CATCH2_INTERNAL_TEST_39()':
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_net_oxenc/oxenc/work/oxen-encoding-1.1.0/tests/test_bt.cpp:717:67: error: ISO C++ forbids compound-literals [-Werror=pedantic]
  717 |     CHECK(buf_view(oxenc::apple_to_chars10(buf, (unsigned char){42})) == "42");
      |                                                                   ^
In file included from /opt/local/include/catch2/catch_test_macros.hpp:11,
                 from /opt/local/include/catch2/catch_template_test_macros.hpp:20,
                 from /opt/local/include/catch2/catch_all.hpp:37:
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_net_oxenc/oxenc/work/oxen-encoding-1.1.0/tests/test_bt.cpp:717:67: error: ISO C++ forbids compound-literals [-Werror=pedantic]
  717 |     CHECK(buf_view(oxenc::apple_to_chars10(buf, (unsigned char){42})) == "42");
      |                                                                   ^
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_net_oxenc/oxenc/work/oxen-encoding-1.1.0/tests/test_bt.cpp:717:67: error: ISO C++ forbids compound-literals [-Werror=pedantic]
  717 |     CHECK(buf_view(oxenc::apple_to_chars10(buf, (unsigned char){42})) == "42");
      |                                                                   ^
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_net_oxenc/oxenc/work/oxen-encoding-1.1.0/tests/test_bt.cpp:721:67: error: ISO C++ forbids compound-literals [-Werror=pedantic]
  721 |     CHECK(buf_view(oxenc::apple_to_chars10(buf, (unsigned char){42})) == "42");
      |                                                                   ^
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_net_oxenc/oxenc/work/oxen-encoding-1.1.0/tests/test_bt.cpp:721:67: error: ISO C++ forbids compound-literals [-Werror=pedantic]
  721 |     CHECK(buf_view(oxenc::apple_to_chars10(buf, (unsigned char){42})) == "42");
      |                                                                   ^
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_net_oxenc/oxenc/work/oxen-encoding-1.1.0/tests/test_bt.cpp:721:67: error: ISO C++ forbids compound-literals [-Werror=pedantic]
  721 |     CHECK(buf_view(oxenc::apple_to_chars10(buf, (unsigned char){42})) == "42");
      |                                                                   ^
cc1plus: all warnings being treated as errors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant