Slashdot Mirror


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)."

1 of 378 comments (clear)

  1. Re:Let's get C99 right first by Dwedit · · Score: 1, Redundant

    The big problem is that you can't compile C programs that make use of GCC extensions using Visual C++. This includes even the most basic stuff, like declaring variables in the middle of your code. It's actually a GCC extension to C, despite being a standard feature of C++.

    The only way to compile such programs on Visual Studio is to force the compiler to use C++ mode instead of C mode. Then you get a bunch of compiler errors, because C++ is a different language than C, and gives errors when you assign pointer types that don't match. You need to find every single malloc, then cast it to the correct pointer type the compiler wants you to use, otherwise it refuses to build. Then find all the other pointer assignments that fail as well. Always tons of those.