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

test: ensure public headers have C++ linkage directive #1224

Closed
garlick opened this issue Oct 9, 2017 · 2 comments
Closed

test: ensure public headers have C++ linkage directive #1224

garlick opened this issue Oct 9, 2017 · 2 comments

Comments

@garlick
Copy link
Member

garlick commented Oct 9, 2017

I just noticed that kvs.h has some function definitions that are not enclosed in an "extern C" directive after the merge of #1223. Is there a test we can add to catch this and any future slip-ups?

Maybe something that runs through the public symbols defined in libflux-core.so et al and generates C++ code that includes the flux headers and references the symbols, then attempt to link that program to ensure the C++ compiler did not mangle the C symbols? That may be an impractical proposition but thought I'd throw it out there in case others have some good ideas of how to do it.

@morrone
Copy link
Contributor

morrone commented Oct 9, 2017

I can't think of anything more practical. It probably isn't a big deal though, because fixing it doesn't change the compilation of the libraries. And a user can always work around by adding their own extern "C" wrapper. The bigger issue is finding things that won't actually compiler under C++, and we would only find those issues by actually compiling everything under C++. And like you said, that might not be that practical.

@garlick
Copy link
Member Author

garlick commented Oct 19, 2017

This is probably not worth holding open as an issue on.

@garlick garlick closed this as completed Oct 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants