By default, gcc is using gnu C/C++ standard (gnu99, etc.). This means that __STRICT_ANSI__ is not defined. However, cpptools will always define __STRICT_ANSI__, unless otherwise specified with cStandard (specifying "cStandard": "gnu99" will correctly result in __STRICT_ANSI__ not being defined).
Consider the setup below. IntelliSense shows "__STRICT_ANSI__ defined", but running this program, it prints "__STRICT_ANSI__ not defined".
main.c
#include <stdio.h>
int main()
{
#ifdef __STRICT_ANSI__
printf("__STRICT_ANSI__ defined\n");
#else
printf("__STRICT_ANSI__ not defined\n");
#endif
return 0;
}
c_cpp_properties.json
{
"configurations": [
{
"name": "Win32",
"compilerPath": "C:/mingw-w64/8.1.0/mingw32/bin/gcc.exe"
}
],
"version": 4
}
By default, gcc is using gnu C/C++ standard (gnu99, etc.). This means that
__STRICT_ANSI__is not defined. However, cpptools will always define__STRICT_ANSI__, unless otherwise specified withcStandard(specifying"cStandard": "gnu99"will correctly result in__STRICT_ANSI__not being defined).Consider the setup below. IntelliSense shows "__STRICT_ANSI__ defined", but running this program, it prints "__STRICT_ANSI__ not defined".
main.c
c_cpp_properties.json