This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: use of %n in genmodes.c causes trouble on Vista


Matt Fago <fago@earthlink.net> writes:

> > I would say that gets is much more dangerous than %n in printf, but
> > presumably Microsoft does not disable gets
> 
> Actually, for gets, and essentially the entire stdio.h, Visual Studio 2005 
> generates:
> 
>      warning C4996: 'gets': This function or variable may be unsafe. Consider
>      using gets_s instead. To disable deprecation, use 
>      _CRT_SECURE_NO_WARNINGS. See online help for details.

Sure, glibc issues a warning too.  But issuing a warning is very
different from disabling.  Apparently Visual Studio does not warn
about %n; it simply disables it.

Ian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]