Liste des Groupes | Revenir à cl c |
On 03.04.2025 16:58, David Brown wrote:I don't think there will be any non-obvious issues - at least, not unless you have code that relies on undefined behaviour. Of course you will also have trouble if you have a TU compiled for C90 that defines its own "quick_exit" function and you want to link that with a C11 TU using the standard library "quick_exit" function. The great majority of the changes in the standard apply within the translation unit, or are new library functions, or extensions to existing ones (like additional features in "printf").[...](I understand the wish to have that #pragma supported.)
>
I know people can use pre-processor conditional compilation based on
__STDC_VERSION__ to complain if code is compiled with an unexpected or
unsupported standard, but few people outside of library header authors
actually do that. I'd really like :
>
#pragma STDC VERSION C17
>
to force the compiler to use the equivalent of "-std=c17
-pedantic-errors" in gcc.
Can there be linking problems when different "C" modules have
been compiled with different '-std=cXX' or '#pragma STDC ...'
settings? - The question just occurred to me.
Les messages affichés proviennent d'usenet.