Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

C language evolves

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

like image 700
DrBeco Avatar asked Mar 27 '11 17:03

DrBeco


2 Answers

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.

like image 188
Vlad Avatar answered Sep 19 '22 20:09

Vlad


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?

like image 44
Sandro Munda Avatar answered Sep 19 '22 20:09

Sandro Munda