That's not a bug!
Please read other reports. To enable safe functions you have to define library extension __STDC_WANT_LIB_EXT1__.
With:
#define __STDC_WANT_LIB_EXT1__ 1
#include <stdio.h>
int main(int argc, char *argv[])
{
char b[100];
gets_s(b, sizeof b);
printf("%s\n",b);
return 0;
}
You will get no more warnings.
gets is deprecated.
No Frankie, sorry
1. I were not sure about gets_s - so ask for possible explanation - thank you for!
2. It was depricated in the c99 standart, but in the c11 standart it was
excluded - so it is the bug, minor one... by the way, with the c99 option the compiler produces "The function gets() is marked as depricated " - and it is true by all means.
yet, gets_s() is recommended for usage instead gets() and it is included in the standart C library, so i can see (at the first sight) no reason to protect it with ugly
__STDC_WANT_LIB_EXT1__ 1
why (to say) Orinius did not put printf() under it...