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

Logging: Fix issues that leads to failures when compiling for C++ #34516

Merged
merged 3 commits into from
Apr 27, 2021

Conversation

nordic-krch
Copy link
Contributor

@nordic-krch nordic-krch commented Apr 23, 2021

Solving few casting issues in logging headers.

Limiting _Generic usage in cbprintf to C only.

I will work towards extending logging tests to validate C++ case.
Note, that for now logging v2 will work slower for C++ because _Generic cannot be used. This will also be fixed.

Fixes #34495.
Fixes #34527.

@github-actions github-actions bot added the area: API Changes to public APIs label Apr 23, 2021
@zephyrbot zephyrbot added area: Base OS Base OS Library (lib/os) area: Logging labels Apr 23, 2021
trond-snekvik pushed a commit to trond-snekvik/sdk-zephyr that referenced this pull request Apr 23, 2021
Cleanup to fix warnings coming from c++ compilation.

Upstream PR: zephyrproject-rtos/zephyr#34516

Signed-off-by: Krzysztof Chruscinski <[email protected]>
(cherry picked from commit f78fc3fe3b0356ab1fe3da4f9e56ef5642994838)
Signed-off-by: Trond Einar Snekvik <[email protected]>
trond-snekvik pushed a commit to trond-snekvik/sdk-zephyr that referenced this pull request Apr 23, 2021
Add guard to not use C11 specific feature when in C++.

Upstream PR: zephyrproject-rtos/zephyr#34516

Signed-off-by: Krzysztof Chruscinski <[email protected]>
(cherry picked from commit a51eac6c073ae943fe45fd0a8b363ba1957d7347)
Signed-off-by: Trond Einar Snekvik <[email protected]>
trond-snekvik pushed a commit to trond-snekvik/sdk-zephyr that referenced this pull request Apr 23, 2021
Fixed C++ warnings coming from implicit casting.

Upstream PR: zephyrproject-rtos/zephyr#34516

Signed-off-by: Krzysztof Chruscinski <[email protected]>
(cherry picked from commit b10bf7299d2414cc48814e4eb6cd70477057bb3f)
Signed-off-by: Trond Einar Snekvik <[email protected]>
@carlescufi
Copy link
Member

@nordic-krch please rebase

@galak
Copy link
Collaborator

galak commented Apr 26, 2021

@nordic-krch would be good to have some test extended to check this out on C++.

Cleanup to fix warnings coming from c++ compilation.

Signed-off-by: Krzysztof Chruscinski <[email protected]>
Add guard to not use C11 specific feature when in C++.

Signed-off-by: Krzysztof Chruscinski <[email protected]>
Fixed C++ warnings coming from implicit casting.

Signed-off-by: Krzysztof Chruscinski <[email protected]>
@nordic-krch
Copy link
Contributor Author

@galak I'm working on that.

@evgeniy-paltsev
Copy link
Collaborator

Tested on ARC MWDT (LLVM based) toolchain. Everything is OK.

@galak galak merged commit 2115964 into zephyrproject-rtos:master Apr 27, 2021
trond-snekvik pushed a commit to trond-snekvik/sdk-zephyr that referenced this pull request Apr 27, 2021
Cleanup to fix warnings coming from c++ compilation.

Upstream PR: zephyrproject-rtos/zephyr#34516

Signed-off-by: Krzysztof Chruscinski <[email protected]>
(cherry picked from commit d8076c3527331bb8887edda3f1386b1227867027)
Signed-off-by: Trond Einar Snekvik <[email protected]>
trond-snekvik pushed a commit to trond-snekvik/sdk-zephyr that referenced this pull request Apr 27, 2021
Add guard to not use C11 specific feature when in C++.

Upstream PR: zephyrproject-rtos/zephyr#34516

Signed-off-by: Krzysztof Chruscinski <[email protected]>
(cherry picked from commit eadf2fe8f4906d30400f6f8178c4593cac34852d)
Signed-off-by: Trond Einar Snekvik <[email protected]>
trond-snekvik pushed a commit to trond-snekvik/sdk-zephyr that referenced this pull request Apr 27, 2021
Fixed C++ warnings coming from implicit casting.

Upstream PR: zephyrproject-rtos/zephyr#34516

Signed-off-by: Krzysztof Chruscinski <[email protected]>
(cherry picked from commit 0d6f038d77105695c006728f5dcf40229247464c)
Signed-off-by: Trond Einar Snekvik <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: API Changes to public APIs area: Base OS Base OS Library (lib/os) area: Logging
Projects
None yet
6 participants