ISO Updates C Standard
An anonymous reader writes "The International Organization for Standardization (ISO) has published the new specifications for the C programming language. The standard is known unofficially as C1X and was published officially as ISO/IEC 9899:2011. It provides greater compatibility with the C++ language and adds new features to C (as indicated in the draft)."
Actually, who cares about that?
Seriously, though, am I the only one who finds it strange that one has to buy copies of the standard?
C is withering and dying? Isn't it still used more than any other language: http://langpop.com/
Who cares about Microsoft these days? Any damage they cause by lagging behind standards is only to themselves, unlike the bad old days. In the modern world GCC is the bar by which Microsoft is measured, and usually found lacking.
Have you got your LWN subscription yet?
Many of us gave up waiting on Microsoft for our development tools.
“Common sense is not so common.” — Voltaire
COBOL is king, always will be.
Solid and reliable code that works period!
thanks, Feltope
For those interested, the last draft before the official version is available for free here: http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf
Don't forget to use the magic uncripple settings if you do that Mr AC or you'll be tying a boat anchor to every non Intel chip that tries to run you code.
ACs don't waste your time replying, your posts are never seen by me.
http://en.wikipedia.org/wiki/C1X
Microsoft wants C to die. No one else is cooperating with them on this. As a result, Windows developers are stuck with worse tools for C than developers on almost any other platform. (Yes, there's MinGW, but it's a real pain and does not support many newer Windows APIs at all.)
Unfortunately, the damage goes beyond that. You can't effectively use GCC (MinGW) to build most Windows applications, not only because these applications are full of Visual C++isms, but also because many newer APIs (notably Direct2D and DirectWrite) are not currently supported under MinGW at all.
"This includes even the most basic stuff, like declaring variables in the middle of your code. It's actually a GCC extension to C"
No it's not— it's part of ISO C99.
The standard is known unofficially as C1X
GCC already says:
A fourth version of the C standard, known as C11, was published in 2011 as ISO/IEC 9899:2011. GCC has limited incomplete support for parts of this standard, enabled with -std=c11 or -std=iso9899:2011. (While in development, drafts of this standard version were referred to as C1X.)
Syntax is everything in C.
Orwell: "In a Time of Universal Deceit, telling the Truth is a Revolutionary Act"
If your program relies on the presence of GCC extensions, you did it wrong in the first place.
https://www.varnish-cache.org/docs/trunk/phk/thetoolsweworkwith.html
Hi, I'm a Windows developer.
I'll take C# over C any day, and I have 20 years of C experience.
I believe that's kinda the parent poster's point. For a windows developer MS make their proprietary C# language easy, and C hard work. Now for most stuff that's fine, but sometimes a lower level language is needed. Ever tried writing a kernel mode driver in C#?
For a windows developer MS make their proprietary C# language easy, and C hard work. Now for most stuff that's fine, but sometimes a lower level language is needed.
Interesting, it's like you've never heard of C++ which MS does fully support [slowly] and is standard. I know pure C is a sacred cow but writing pure procedural code in C++ won't kill you, in fact, it will probably make the code much easier to read since you can't just arbitrarily cast back and forth between void pointers and other types without explicit type brackets.
Ever tried writing a kernel mode driver in C#?
MS has been experimenting with that but it seems more likely that they'll just hoist most drivers into user space services so you can use any language, .Net based or not. They've already hoisted some USB drivers and the bulk of WDDM video card drivers, just backwards compatibility in the way for the rest.
The solidity and reliability of COBOL code comes from decades of correcting bugs and lack of features of most applications that are still in use today. And yes, I've worked professionally as a COBOL programmer.
Not being a C or C++ developer, I'm not sure who to believe - in the Firefox compilation story a few days ago, there were a fair few highly modded up posts extoling the virtues of the quality and speed of binaries output by the MS C and C++ compiler over GCC.
Any thoughts on that?
Actually, C# is as proprietary as C - it isn't. Check http://msdn.microsoft.com/en-us/netframework/aa569283 for the ISO standard details regarding C#. .NET implementation is proprietary, but there is an early open source release of the .NET CLI implementation codenamed "Rotor", for XP, FreeBSD and MacOS X. Additionally, the Mono project is an opensource clean-room implementation, but it may not be feature-complete.
Microsoft
Microsoft Research has an interesting project called Singularity - an operating system running (mostly) in managed code. Some initialization routines are done in Assembly/C/C++, but the kernel itself and respective drivers are written entirely in managed code. Check http://en.wikipedia.org/wiki/Singularity_(operating_system).
GCC? People still use that? Clang can now parse a lot of the standard windows headers. 3.1 should have finished implementing the required quirks to understand the Windows templates. There's also work underway to support the Win64 exception model, which will hopefully be done by the 3.1 release.
I am TheRaven on Soylent News
Some of the not-so-nice features include threads.h, which is equivalent to pthreads but with a different function names (and ones that seem quite likely to cause conflicts with existing code).
I am TheRaven on Soylent News
Simply put, gcc beats VC on standard compliance, and VC beats gcc on optimization quality.
Anyway, VC is primarily a C++ compiler. C support is largely legacy, and hasn't been updated for a long time now.
You have that exactly backwards. It's C+++ that should die.
-jcr
The only title of honor that a tyrant can grant is "Enemy of the State."
I spent my early years programming K&R C on Unix systems.
When the ANSI standards were ratified, ANSI took over.
But WTF is "ISO C"? With a core language whose goal is portability and efficiency, why would I want the language trying to can platform-specific implementations like threading? C is not a general purpose language -- it's power comes from tying to the kernels and platform libraries of the industry at the lowest levels possible to maximize performance.
If you don't need that maximum performance, you use C++ or another high-level language.
ANSI C is the assembler of the modern computing age, not a general purpose programming language.
Now get off my lawn!
Real mission critical stuff at Boeing? NASA? All that stuff then right?
Actually their most critical software is probably written in COBOL, their payroll software. Without that COBOL based software nothing gets done. :-)
Objective-C, of course.