On Sat, Jun 20, 2020 at 01:26:59PM -0400, y2s1982 . via Gcc wrote: > I have a question on API version formatting. > I have been looking at the get_api_version() and get_api_version_string() > documentation: > https://www.openmp.org/spec-html/5.0/openmpsu213.html#x269-17920005.5.1.2 > I also saw how LLVM implements it using macro to store the information: > https://github.com/OpenMPToolsInterface/LLVM-openmp/blob/3b6c06e354ef1e59da22778a9033d87ed0e3b19d/libompd/src/omp-debug.h#L22-L28 > These values are then used here: > https://github.com/OpenMPToolsInterface/LLVM-openmp/blob/3b6c06e354ef1e59da22778a9033d87ed0e3b19d/libompd/src/omp-debug.cpp#L1344-L1358
We don't support any TRs and I think we aren't going to, so just encoding there the 5.0 numbers should be good enough. If the 4 separate bytes of the version isn't something written somewhere in the standard, I'd use something along the lines of #define GCC_VERSION (__GNUC__ * 1000 + __GNUC_MINOR__) macro, so make it #define OMPD_VERSION (5 * 10000 + 0 * 100 + 0) so there is some room for minor revisions below that. Jakub