The C ++ standard used C90 as a normative reference until C ++ 11, so C99 functions were only supported in C ++ 11. Although the compiler could freely support them outside of C ++ 11 as an extension. I would suggest that this would only work with later versions of Visual Studio , given their relatively recent C99 support disk, and cremno indicates that it has been supported since 2015 .
If we move on to the standard section of the C ++ 11 project 1.2 Normative references [intro.refs], he says:
The following referenced documents are required to apply this document. For dated references, only the edition cited. For undated references, latest edition (including any amendments).
and includes:
- ISO / IEC 9899: 1999, Programming Languages ββ- C
and also says:
The library described in clause 7 of ISO / IEC 9899: 1999 and clause 7 of ISO / IEC 9899: 1999 / Cor.1: 2001 and clause 7 of ISO / IEC 9899: 1999 / Cor.2: 2003 is hereinafter referred to as the standard C library. one
before C ++ 11 it was:
- ISO / IEC 9899: 1990, Programming Languages ββ- C
and if we try the example in gcc using -std=c++03 -pedantic , it warns:
warning: ISO C ++ 98 does not support the length modifier hh 'gnu_printf [-Wformat =]
Shafik yaghmour
source share