-
Notifications
You must be signed in to change notification settings - Fork 501
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
Add -Wno-error=attributes if the current compiler is GCC #375
Labels
Comments
pavel-kirienko
added
class-feature
priority-low
A minor issue
domain-build
Issues that are about building libcyphal.
labels
Aug 11, 2024
@pavel-kirienko Please give me details how to reproduce it. F.e. what exact "older" version of GCC I should try on? Thanks! |
I was trying to build it on my laptop last night which has GCC 11, which produced this warning. This is a known issue; in another codebase we have this: # Disable GCC warnings that produce false positives due to bugs in the compiler.
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unknown-attributes -Wno-maybe-uninitialized -Wno-uninitialized")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-error=stringop-overread")
endif () Clang appears to be much more stable btw. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Because older versions of GCC do not recognize
[[unused]]
and hence break the build.The text was updated successfully, but these errors were encountered: