News for hackers. Stuff that matters.
Re:Writing Bug-Free C Code (1995) by unwind on Friday April 17, 2015 @10:18AM (#9394420)
This is very old, so it isn't even aware of C99 which leads to lots of bogus suggestions and tips.

Unless you know that you're going to be targeting truly ancient architectures/platforms, C99 really is the absolute minimum thing to be using these days when developing in C. It's 15 years old, it's not "new" or "non-standard" or "non-portable".

Edit: Of course I'm aware that Visual Studio doesn't support C99, so I guess that sorts under "truly ancient architectures/platforms", then. For C development, Windows' flagship development environment is ancient. I know it's a great IDE, but it's not a great C compiler since it doesn't support the language any more.

Re:Writing Bug-Free C Code (1995) by pjmlp on Friday April 17, 2015 @12:03PM (#9395181)
Microsoft's official position is that any greenfield project should be in C++ and for those developers that really want a C compiler there are other options.

Specially in a world where most APIS are either .NET or transitioning to COM/Windows Runtime.

At last year's "Connect(); Microsoft Visual Studio vNext & Azure", they confirmed the C++ focus for native code, besides the upcoming .NET Native.

https://channel9.msdn.com/Events/Visual-Studio/Connect-event...

The C99 support that has been added was what is required by C++ standard and some specific customers.

Even the new C runtime is actually implemented in C++ with the functions exposed as extern "C".

http://blogs.msdn.com/b/vcblog/archive/2014/06/10/the-great-...

Re:Writing Bug-Free C Code (1995) by antaviana on Friday April 17, 2015 @01:17PM (#9395745)
I believe the upcoming .NET Native applies only to Windows Store apps, not to Windows Desktop apps, which I find it is a pity.
Re:Writing Bug-Free C Code (1995) by pjmlp on Friday April 17, 2015 @01:51PM (#9395978)
You always have NGEN, besides this is v1.0. They are pretty open that it might change in the future.

Personally I think it is bound to the adoption of the Windows Store and the Universal App model.

Re:Writing Bug-Free C Code (1995) by faragon on Friday April 17, 2015 @12:31PM (#9395412)
Since MS Visual Studio 2013, VS supports C99. It looks like MS wanted to "deprecate" the C language. They seem to acknowledge their mistake in an implicit way, in my opinion.
Re:Writing Bug-Free C Code (1995) by WalterGR on Friday April 17, 2015 @02:09PM (#9396092)
http://blogs.msdn.com/b/vcblog/archive/2013/07/19/c99-librar... describes what they added in VS 2013 and what is still missing.

http://blogs.msdn.com/b/vcblog/archive/2014/06/18/crt-featur... from June of last year says in part:

    In the Visual Studio "14" CTP we have fully implemented the C99 Standard
    Library, with the exception of any library features that depend on compiler
    features not yet supported by the Visual C++ compiler (notably, <tgmath.h>
    is not implemented). There are undoubtedly some remaining conformance issues--
    we know of a few, including that _Exit is missing and wcstok has the wrong
    signature, and we are working to fix these.
"CTP" == "Community Tech Preview", i.e. a beta.
Re:Writing Bug-Free C Code (1995) by faragon on Friday April 17, 2015 @02:19PM (#9396154)
Well, in VS 2013 there was C99 language support, i.e. my C99 code compiled properly (while not in previous VS editions). I had to add minor modifications because the C library (e.g. %zu for printing size_t arguments -not sure if already covered by VS 2014-), as the article pointed by you tells.
Re:Writing Bug-Free C Code (1995) by bitwize on Friday April 17, 2015 @10:25AM (#9394460)
Sorry, I don't know what planet you're living on but here in the real world of professional software development much of the world's software has to compile in Visual Studio -- which did not support C99 for years and still only partially supports it.
Re:Writing Bug-Free C Code (1995) by reitanqild on Friday April 17, 2015 @02:56PM (#9396416)
Same as Nursie, I guess coding new software in C on Windows is an antipattern.
Re:Writing Bug-Free C Code (1995) by bitwize on Friday April 17, 2015 @04:28PM (#9397008)
The official narive-code application language for Windows is C++. Microsoft recommends you use that.
Re:Writing Bug-Free C Code (1995) by adrianN on Friday April 17, 2015 @11:56AM (#9395134)
Everybody who develops SIL 4 code has a really tough time using any modern compiler, because the compiler has to be approved for development of security critical code. This usually means that the shippable version of your code has to compile on some proprietary compiler that is at least twenty years old and can't be improved without losing its certification.
Re:Writing Bug-Free C Code (1995) by iveqy on Friday April 17, 2015 @10:23AM (#9394447)
People are still using Visual Studio as far as I know and Visual Studio isn't supporting C99, which makes C99 non-portable as long as Visual Studio is the default compiler for Windows and Windows beeing a big player.
Re:Writing Bug-Free C Code (1995) by Nursie on Friday April 17, 2015 @11:36AM (#9394965)
Is windows a big player for C development? If you want to code for windows there are better options. If you want to write C there are better options than VS.
Re:Writing Bug-Free C Code (1995) by Hobotron1 on Friday April 17, 2015 @12:30PM (#9395410)
I like PellesC for playing around on my own projects, but have wondered if there's anyone using it for serious development.

http://en.wikipedia.org/wiki/Pelles_C

http://www.smorgasbordet.com/pellesc/