-
Notifications
You must be signed in to change notification settings - Fork 52
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
Incompatible detection for Intel Compiler on windows #39
Comments
Interesting, thanks for the report. I thought ICC just supported both versions everywhere; IIRC you can use several MSVC-style things on Linux. I'll try to get a copy of ICC installed on a Windows VM over the weekend, and hopefully make a new release early next week. |
I installed Intel oneAPI on a Windows VM, and I'm unable to reproduce this. Just like on Linux, it supports both attribute and declspec syntaxes. Can you please provide a reproducible test case, including the exact command you're using to invoke the compiler? If it helps, there are lots of tests in the test/ subdirectory. |
Hello, I can try to make a reproducible test case for you. But what I have exactly now is that I discovered this problem when using the
And that investigating this, hedley was providing this definition based on the fact it detected an Intel C++ compiler:
Which the compiler was not accepting. Testing the following snippet:
in another part of my project, which does not use
Patching hedley to short circuit the intel compiler detection was my temporary way around the problem. Have you tested the compiler yourself through the |
I realized you might be testing a different C++ compiler than I am. This intel oneAPI DPC++ is something I didn't know and I just heard about from yourself. |
As soon as I saw the command you're using I saw the problem; I was using icx not icc. AFAICT icx is basically their next-generation clang-based compiler, which looks like it will support both attribute and declspec just like icc does. You can get icc through oneAPI (it's in the HPC add-ons); DPC++ is something else. I'm going to need to think about the API a bit. I'm leaning towards HEDLEY_INTEL_* basically being icc-only, and adding a separate HEDLEY_ICL_* group for icl. Interestingly, neither |
This is the cl-like frontend for ICC. Unfortunately it doesn't support all the features of ICC, even though it defines __INTEL_COMPILER, nor does it quite match up to MSVC (though it defines _MSC_VER). It does support __builtin_expect, though it doesn't support statement exprs, so HEDLEY_PREDICT_TRUE/FALSE will not work. And it doesn't actually support C-style static assertions, even though __has_feature(c_static_assert) is true. This patch is just the basic level of support necessary to get icl working; I need to go through all the macros and add ICL cases. Fixes #39
This is the cl-like frontend for ICC. Unfortunately it doesn't support all the features of ICC, even though it defines __INTEL_COMPILER, nor does it quite match up to MSVC (though it defines _MSC_VER). It does support __builtin_expect, though it doesn't support statement exprs, so HEDLEY_PREDICT_TRUE/FALSE will not work. And it doesn't actually support C-style static assertions, even though __has_feature(c_static_assert) is true. This patch is just the basic level of support necessary to get icl working; I need to go through all the macros and add ICL cases. Fixes #39
I have added full support for icl, sorry about the delay. It's in the dev branch now, and I'm planning on putting out a release in the next day or two. |
@nemequ Do you have a rough idea when the next release will be published? |
@nlohmann, I can do it today if you want. I was kind of hoping to get a better idea of how an issue with warning numbers on PGI will be resolved, but the code I have in place right now will just disable both warning numbers which should be stable going forward, and I can always tweak it in the next release to only disable one if PGI fixes it. Edit: to be clear, all we would lose by releasing now is that on future versions of PGI might disable more diagnostics than are strictly necessary until Hedley is updated again so we test for PGI == 20.7 instead of PGI >= 20.7 when determining which diagnostic numbers to disable. In other words, a relatively small price to pay for releasing now. |
I did not mean to rush you. It's just that I have nlohmann/json#2346 which depends on this fix, and I would rather not make a release with the develop version of Hedley. |
No worries, I understand. If you want to make a release I can go ahead and put one out first; I've done pretty much all of the necessary testing already, so it's really not a big deal. Waiting on PGI is probably a bit silly; it's not exactly a popular compiler, and the only disadvantage to putting out a release now is that future versions of the compiler will disable one more diagnostic then they have to (i.e., using I'll go ahead and finish up my testing with the current dev branch this afternoon. Then if you can just give me a little warning before you want to make a new release I'll make sure to put out a new version of Hedley (which is trivial once the testing is done). |
@nlohmann, I just release v14, it's exactly the same as what has been in dev for a while. |
Hedley correctly detects Intel compiler and version, but then uses it to enable usage of GCC dialects like attribute(foo) which is not supported on windows, where the compiler is going for MSVC compatibility instead of GCC. Likewise it is not making use of the parts of the MSVC dialect which are supported by Intel on that platform.
The text was updated successfully, but these errors were encountered: