Skip to content

Conversation

@pabigot
Copy link
Contributor

@pabigot pabigot commented Aug 13, 2019

This collects more changes necessary for closing issue #17997.

Consistently place C++ use of extern "C" after all include directives,
within the negative branch of _ASMLANGUAGE if used.

Background from issue zephyrproject-rtos#17997:

Declarations that use C linkage should be placed within extern "C"
so the language linkage is correct when the header is included by
a C++ compiler.

Similarly #include directives should be outside the extern "C" to
ensure the language-specific default linkage is applied to any
declarations provided by the included header.

See: https://en.cppreference.com/w/cpp/language/language_linkage
Signed-off-by: Peter Bigot <[email protected]>
Consistently place C++ use of extern "C" after all include directives,
within the negative branch of _ASMLANGUAGE if used.

Background from issue zephyrproject-rtos#17997:

Declarations that use C linkage should be placed within extern "C"
so the language linkage is correct when the header is included by
a C++ compiler.

Similarly #include directives should be outside the extern "C" to
ensure the language-specific default linkage is applied to any
declarations provided by the included header.

See: https://en.cppreference.com/w/cpp/language/language_linkage
Signed-off-by: Peter Bigot <[email protected]>
Consistently place C++ use of extern "C" after all include directives,
within the negative branch of _ASMLANGUAGE if used.

Background from issue zephyrproject-rtos#17997:

Declarations that use C linkage should be placed within extern "C"
so the language linkage is correct when the header is included by
a C++ compiler.

Similarly #include directives should be outside the extern "C" to
ensure the language-specific default linkage is applied to any
declarations provided by the included header.

See: https://en.cppreference.com/w/cpp/language/language_linkage
Signed-off-by: Peter Bigot <[email protected]>
Consistently place C++ use of extern "C" after all include directives,
within the negative branch of _ASMLANGUAGE if used.

Background from issue zephyrproject-rtos#17997:

Declarations that use C linkage should be placed within extern "C"
so the language linkage is correct when the header is included by
a C++ compiler.

Similarly #include directives should be outside the extern "C" to
ensure the language-specific default linkage is applied to any
declarations provided by the included header.

See: https://en.cppreference.com/w/cpp/language/language_linkage
Signed-off-by: Peter Bigot <[email protected]>
@pabigot pabigot added this to the v2.0.0 milestone Aug 13, 2019
@zephyrbot zephyrbot added area: C Library C Standard Library area: Test Framework Issues related not to a particular test, but to the framework instead area: Samples Samples labels Aug 13, 2019
@pabigot
Copy link
Contributor Author

pabigot commented Aug 14, 2019

Note that the shippable failure is due to #18198 and is unrelated to this PR.

Copy link
Member

@carlescufi carlescufi left a comment

Choose a reason for hiding this comment

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

LGTM. All the changes are similar to the ones in the rest of C++ PRs.

@carlescufi
Copy link
Member

@galak @nashif please take a look
@pabigot can you check CI?

@pabigot
Copy link
Contributor Author

pabigot commented Aug 15, 2019

@carlescufi CI isn't going to pass until there's a new toolchain with zephyrproject-rtos/sdk-ng#96 verified and merged. The same build failure happens on master; I don't know why it wasn't discovered during toolchain validation.

@pabigot pabigot closed this Aug 16, 2019
@pabigot pabigot reopened this Aug 16, 2019
@pabigot pabigot closed this Aug 16, 2019
@pabigot pabigot reopened this Aug 16, 2019
@pabigot
Copy link
Contributor Author

pabigot commented Aug 17, 2019

CI now passes.

@ioannisg ioannisg requested a review from galak August 19, 2019 15:49
@ioannisg ioannisg merged commit 849df51 into zephyrproject-rtos:master Aug 19, 2019
@pabigot pabigot deleted the exc/misc branch August 21, 2019 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: C Library C Standard Library area: C++ area: Samples Samples area: Test Framework Issues related not to a particular test, but to the framework instead

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants