Skip to content

Disable buggy GCC warning #445

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,3 @@ Checks: '*,
'
WarningsAsErrors: '*'
HeaderFilterRegex: '*'
ExcludeHeaderFilterRegex: 'catch_test_macros.hpp'
4 changes: 3 additions & 1 deletion .github/workflows/main_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,15 @@ on:
branches:
- main
paths:
- "**/CMakeLists.txt"
- ".github/**"
- "**.cpp"
- "**.h"
pull_request:
branches:
- main
paths:
- "**/CMakeLists.txt"
- ".github/**"
- "**.cpp"
- "**.h"
Expand Down Expand Up @@ -143,7 +145,7 @@ jobs:
if: github.event.pull_request.draft == false
needs: [build-and-unit-test, choose_crypto_matrix]
name: Build with clang-tidy
runs-on: ubuntu-latest
runs-on: macos-latest
strategy:
matrix:
crypto: ${{ fromJson(needs.choose_crypto_matrix.outputs.matrix )}}
Expand Down
8 changes: 7 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,14 @@ include(GNUInstallDirs)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID MATCHES "GNU")

message("Compiler ID: ${CMAKE_CXX_COMPILER_ID}")
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wall -pedantic -Wextra -Werror -Wmissing-declarations)
elseif(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
# -Wno-dangling-reference because GCC apparently has some bugs in its implementation
# https://stackoverflow.com/questions/78759847/gcc-14-possibly-dangling-reference-to-a-temporary-warning-or-not-depending-on
add_compile_options(-Wall -pedantic -Wextra -Werror -Wmissing-declarations -Wno-dangling-reference)
elseif(MSVC)
add_compile_options(/W4 /WX)
add_definitions(-DWINDOWS)
Expand Down
Loading