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

toolchain: Add macros to disable compiler warnings #84063

Merged

Conversation

thughes
Copy link
Contributor

@thughes thughes commented Jan 15, 2025

These macros allow disabling compiler warnings for all compilers or only gcc or only clang.

Note that the reason to have gcc and clang-specific versions in addition to the general version is that sometimes only clang or gcc will emit a warning.

A followup PR will convert existing code to use these: #84065

@tejlmand
Copy link
Collaborator

See comment here: #84065 (review)

@thughes thughes force-pushed the add-toolchain-compiler-warning-macros branch from 3949f4e to a2a59f9 Compare January 25, 2025 00:36
@thughes
Copy link
Contributor Author

thughes commented Jan 28, 2025

@tejlmand I think I addressed your comments, so let me know if there's anything else.

Copy link
Contributor

@RobinKastberg RobinKastberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks fine for us.

include/zephyr/toolchain/gcc.h Outdated Show resolved Hide resolved
tejlmand
tejlmand previously approved these changes Jan 31, 2025
@thughes thughes force-pushed the add-toolchain-compiler-warning-macros branch from 9cfce6b to 7b0398d Compare February 7, 2025 18:49
These macros allow disabling compiler warnings for all compilers or only
gcc or only clang.

Signed-off-by: Tom Hughes <[email protected]>
@thughes thughes force-pushed the add-toolchain-compiler-warning-macros branch from 7b0398d to bca5bc4 Compare February 12, 2025 22:33
@thughes
Copy link
Contributor Author

thughes commented Feb 12, 2025

@tejlmand FYI: #85542

@kartben kartben merged commit cc50765 into zephyrproject-rtos:main Feb 14, 2025
22 checks passed
@thughes thughes deleted the add-toolchain-compiler-warning-macros branch February 14, 2025 19:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants