In the header file "jas_config.h" there is the test with warning
#if (__STDC_VERSION__ - 0 < JAS_STDC_VERSION)
#warning "Your code is being built against an older version of the C standard than JasPer was. Although this is supported, this may require some extra preprocessor defines when building."
#endif
This is a valid(and worthwhile test when code is being compiled with a C compiler eg gcc when the symbol STDC_VERSION is defined with a value by the gcc compiler.
However there is a problem when code is being compiled with a C++ compiler eg g++ because g++ does not define the symbol STDC_VERSION but has a value of the version in the symbol __cplusplus instead.
So test if STDC_VERSION has a value and then use that, otherwise test if __cplusplus has a value and use that, otherwise complain that no version is set.
In the header file "jas_config.h" there is the test with warning
This is a valid(and worthwhile test when code is being compiled with a C compiler eg gcc when the symbol STDC_VERSION is defined with a value by the gcc compiler.
However there is a problem when code is being compiled with a C++ compiler eg g++ because g++ does not define the symbol STDC_VERSION but has a value of the version in the symbol __cplusplus instead.
So test if STDC_VERSION has a value and then use that, otherwise test if __cplusplus has a value and use that, otherwise complain that no version is set.