Which is the most up-to-date version of the C language and which compiler works best?

Asked

Viewed 675 times

1

Which is the most up-to-date version of the C language and which compiler works best?

  • The most up-to-date version of the language (not specific compilers) is from December 2011. Telling which compiler works best depends heavily on personal opinion, especially without you describing the situations or scenarios you consider relevant.

1 answer

5


Today C18 is the most updated specification where GCC 8 and Clang 6 are supporting, but in essence changes nothing important compared to C11.

Few people use C11, the previous specification that matters now, because features of it are not supported by most compilers and would be problematic to port. They even adopt something because part of it is saying that some things in C99 are no longer mandatory.

In general it adopts C99, some prefer C89 which is very backward (the first universal specification) and in practice is only necessary if it will be used in very bad or obscure compilers, and if you need to support it in your code, you will already have to do other specific things. Rare compiler that supports 100% of C99, but what is not supported is already controversial and avoid using for other reasons.

So in practice what is adopted is a hybrid of C89, C99 and C11.

There is no such thing as a compiler that works best. Either it works or it doesn’t. Some can do something better, but it is a specific point and not general.

Those who use Windows tend to use the Microsoft compiler. Already on Linux tend to use GCC, on Mac they use Clang, but this has been adopted by many people, including kind of become standard in Freebsd. There are some that use Intel for specific optimizations, but it’s rare. Others are only used because of platform or specific need or legacy. The former support all major platforms. Yes, contrary to what you think, the Microsoft compiler generates perfect code for Linux, Mac, Android, etc.

  • It can be said that the most commonly used version is the C99?

  • Yes, but maybe someone disagrees because they denied the answer.

  • Oops, it was an accident.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.