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

Which compilers, compiler options, and C/C++ standard versions do the headers support? #127

Open
bashbaug opened this issue Oct 6, 2020 · 5 comments

Comments

@bashbaug
Copy link
Contributor

bashbaug commented Oct 6, 2020

We haven't documented which compilers and compiler options including C and C++ standard versions the headers support, which makes it difficult to determine if issues like #115 and #121 are header issues or unsupported configurations. We should document (and test for!) the compilers and compiler options we're intending to support and be clear that other configurations may not work or have limitations.

FWIW, there is a similar issue already for the C++ bindings:
KhronosGroup/OpenCL-CLHPP#78

@MathiasMagnus
Copy link
Contributor

I'm currently cooking up Github Actions CI, which I intend on propagating through the OpenCL repos (Headers, CLHPP, ICD, SDK). In the specific case of the C headers, I'm initially looking to implement this matrix:

Linux

  • COMP: GCC-7, GCC-8, GCC-9, LLVM-9, LLVM-10, LLVM-11
  • STD: c90, c99, c11, c18, gnu90, gnu99, gnu11, gnu18
  • GEN: GNU Makefiles, Ninja
  • VAR: Debug, Release

Windows

  • COMP: MSVC-v140, MSVC-v141, MSVC-v142, LLVM-9, LLVM-10, LLVM-11
  • STD: c90, c11, ms90
  • GEN: MSBuild, Ninja
  • VAR: Debug, Release

MacOS

  • COMP: ? (Need little help with defining a reasonable compiler set)
  • STD: c90, c11, c18
  • GEN: Ninja
  • VAR: Debug, Release

@oddhack
Copy link
Contributor

oddhack commented Oct 7, 2020

Requiring support for 30 year old C standards seems excessive, but whatever you do, suggest you state it explicitly in the API spec, as Vulkan does (if there is any such statement, I couldn't easily find it).

@MathiasMagnus
Copy link
Contributor

@oddhack It's not for me to say. C not having a standard release for 21 years between 90 and 11 is something we have to deal with. 10 years old code had to be developed against a 30 year old standard. As much as I love upgrading stuff, before calling it quits on code that's not even 10 years old... That's almost as if your compiler would tell you C++11 is so passé, I'll reject compiling it tomorrow.

@oddhack
Copy link
Contributor

oddhack commented Oct 7, 2020

@oddhack It's not for me to say. C not having a standard release for 21 years between 90 and 11 is something we have to deal with.

We baselined Vulkan on C99, which is AFAIK a standard (ISO/IEC 9899:1999).

@MathiasMagnus
Copy link
Contributor

@oddhack I stand corrected. My familiarity with C standards is lacking, as can be seen.

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

3 participants