Skip to content

Conversation

@pabigot
Copy link
Contributor

@pabigot pabigot commented Dec 14, 2019

-Wold-style-definition is not a supported option for C++ builds. To prevent it being passed:

  • the list of compiler flags to be excluded from C++ builds is moved to be toolchain-specific;
  • -Wold-style-definition is added to that list for gcc and clang;
  • -Wold-style-definition is moved from zephyr_compiler_options to zephyr_cc_option so the option checking code is executed for it.

Fixes #16239

Copy link
Contributor

Choose a reason for hiding this comment

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

list(APPEND

then it could be populated elsewhere as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thanks; updated.

Copy link
Contributor

Choose a reason for hiding this comment

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

# -Werror=implicit-int and other flags in CXX_EXCLUDED_OPTIONS are not supported for CXX and we are not able

Sorry for the stepwise feedback.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Is the new wording OK? I didn't want to mention specific flags because they might not apply to certain toolchains.

Copy link
Contributor

Choose a reason for hiding this comment

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

Looks great

-Wold-style-definition is not a supported option for C++ builds.  To
prevent it being passed:
* the list of compiler flags to be excluded from C++ builds is moved
  to be toolchain-specific;
* -Wold-style-definition is added to that list for gcc and clang;
* -Wold-style-definition is moved from zephyr_compiler_options to
  zephyr_cc_option so the option checking code is executed for it.

Signed-off-by: Peter A. Bigot <[email protected]>
@carlescufi carlescufi merged commit 60ca233 into zephyrproject-rtos:master Dec 18, 2019
@pabigot pabigot deleted the pabigot/20191214b branch December 19, 2019 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Build: C++ compiler warning '-Wold-style-definition'

3 participants