Quantcast
Channel: Compatibility of C89/C90, C99 and C11 - Stack Overflow
Viewing all articles
Browse latest Browse all 5

Compatibility of C89/C90, C99 and C11

$
0
0

I just read: C Wikipedia entry. As far as I know there are 3 different versions of C that are widely used: C89, C99 and C11. My question concerns the compatibility of source code of different versions. Suppose I am going to write a program (in C11 since it is the latest version) and import a library written in C89. Are these two versions going to work together properly when compiling all files according to the C11 specification?

Question 1: Are the newer versions of C i.e. C99, C11 supersets of older C versions? By superset I mean, that old code will compile without errors and the same meaning when compiled according to newer C specifications.

I just read, that the // has different meanings in C89 and C99. Apart from this feature, are C99 and C11 supersets of C89?

If the answer to Question 1 is no, then I got another 2 questions.

  1. How to 'port' old code to the new versions? Is there a document which explains this procedure?

  2. Is it better to use C89 or C99 or C11?

Thanks for your help in advance.

EDIT: changed ISO C to C89.


Viewing all articles
Browse latest Browse all 5

Latest Images

Trending Articles





Latest Images