6

1) What is the newest version of C language? 2) How is GCC complying to it? 3) For an old C programmer, what is the main differences of the new language?

I'm asking this because I learned these days (a new feature) that we can actually attribute values to a struct like:

struct t
{
   int i;
   char c;
} s;
s = (struct t){exponent, coefficient};

So I'm wondering about other things I might be missing when programming...

Thanks, Beco

Gabriele Petronella
  • 106,943
  • 21
  • 217
  • 235
DrBeco
  • 11,237
  • 9
  • 59
  • 76

3 Answers3

4

The last standard is C99. I don't use this standard because GCC does not yet fully support. (see here)

There is "C1X" but it is much too premature to talk about it.

For the new features in C99, see the following post :

What are the most useful new features in C99?

Community
  • 1
  • 1
Sandro Munda
  • 39,921
  • 24
  • 98
  • 123
4

The most recent version of C language seems to be C99. Among the numerous changes, the most important IMHO are:

  • restrict pointers
  • variable length arrays
  • built-in complex numbers
  • variable declarations mixed with code
  • C++-style // comments

Here is a bigger list.

Vlad
  • 35,022
  • 6
  • 77
  • 199
1

The next standard is being worked on by the WG 14 group, their home page is here. The "News 2010-12-05" link takes you to a PDF of the current draft, labeled "201x". Paragraphs 6 and 7 highlight changes. Googling "+gcc +c201x" gives reasonable hits, nothing much to nail to a wall. This moves slow as a snail, C99 is not universally implemented yet either.

Hans Passant
  • 922,412
  • 146
  • 1,693
  • 2,536
  • The ISO C standard has always clearly stated major changes from previous versions, it's right there on paragraph 6 of the Foreword. – ninjalj Mar 27 '11 at 18:52
  • Don't forget that Microsoft's compilers don't support C99 at all --- and apparently they have no intention of doing so. See, e.g. http://connect.microsoft.com/VisualStudio/feedback/details/485416/support-c99, but if you look online you can find plenty of angst about this. This is a damned shame, because C99 is really nice to work with; but if you want to write portable code, it's just not an option. – David Given Mar 27 '11 at 19:25
  • Don't give a link to a page with a link, give the final link, because pages change ... as this one did. – Jim Balter Apr 06 '11 at 21:34