-
Notifications
You must be signed in to change notification settings - Fork 150
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
CI is not checking compatibility with MacOs clang #333
Comments
FWIW, I am using clang-11 installed via homebrew, not the Apple clang |
@larseggert do you have a suggestion on how to modify the yml and catch such issues in the future? |
Also, what clang is doing here is importing in the C compiler tokens that are only defined in C++. The Clang 11 token binding source file includes:
Was the bug found in a C compile, or was the code imported in C++? |
C++ |
I think that's the issue, C++. Picotls is purely C, so the tests won't catch conflicts with C++ keywords. I had a similar problem in Picoquic, and solved it by adding an explicit C++ test. Something as simple as compiling hello word in C++ while including picotls.h might suffice. |
By the way, Clang11 should know better. The header includes
A standard conformant compiler should know that what follows is C code, not C++ code... |
Here is the C++ code that I use in picoquic:
Replace picoquic headers by picotls headers, add that to the test library, and call cplusplustest from the test suite. Maybe add one of these for each of minicrypto, openssl and fusion. @kazuho, what do you think? |
@huitema Thank you for the suggestion. I'll add something like that to our tests.
FWIW |
@larseggert just found a bug in a recent PR because the new code introduced a variable named "xor". This works fine with many compilers (gcc, mscc) but clang throws an error because it treats "xor" as a keyword.
What is really weird is that the offending code passed the integration checks, including this run, which tests with:
The issue is being fixed in PR #332, but we should also fix the integration test that did not discover the problem.
The text was updated successfully, but these errors were encountered: