Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

In GNU coding standard it is said that free software developer should use C89 because C99 is not widespread yet.

1999 Standard C is not widespread yet, so please do not require its features in programs.

Reference here.

Are they talking about developers knowledge of C99, or about compilers supporting it?

Also, is this statement plausible as of today or is it somewhat "obsolete" or at least obsolescent.

share|improve this question

3 Answers 3

up vote 2 down vote accepted

According to Wikipedia only the SUN and IBM compilers support the full C99 standard. Even GNU gcc is still missing several features. As you can see from the Wiki article, the subset of features supported varies widely between compilers. If you want your application to be compiler agnostic you'll have to stick with C89.

share|improve this answer
    
So, do you think it's also a decision about developers' skills or is it just technical? –  Federico Culloca Feb 5 '11 at 19:23
    
@Federico. I don't think it has anything to do with developer's skills. It's purely technical and economic. Unlike some of the historic changes in the C++ standard (like the addition of templates), the C99 standard doesn't doesn't add any new paradigms to C programming. It's a goal of GNU projects to work under many different compilers, so they stick to the most prevalent standard. Unfortunately this also means that there is not a lot of pressure on the compiler writers to implement the full standard, since so many developers target C89. –  Charles E. Grant Feb 5 '11 at 19:33

I suspect that this is a left over from years back. At one point MS did not conform to the C99 standard. I am not certain what they claim now. I have not used MS compilers in a few years. I have been using GCC for several ARM/MIPS based platforms. GCC supports C99.

share|improve this answer
4  
MS's compiler still doesn't support much of C99 (some things, like // comments, are supported as a side-effect of being a primarily C++ compiler). –  delnan Feb 5 '11 at 14:41
    
@delnan is correct, Microsoft's compilers support very little of C99, and they don't really have any plans to start supporting it (concentrating on C++). However, most open source software written in C uses C99 and just uses MinGW to compile on Windows. –  Dean Harding Feb 5 '11 at 15:27
    
Even now GCC doesn't support the full C99 standard. See my answer for a link to the status of C99 support in GCC. –  Charles E. Grant Feb 5 '11 at 18:21

The GNU project's own compiler doesn't support C99. It stands to reason that the GNU project does not want GNU software that cannot be compiled with GNU software.

The whole point of the GNU project is to have an independently developed operating environment, that is most importantly free, but secondarily also self-sustaining. Not being able to compile itself would be a huge step backwards.

Of course, this reasoning only applies to the GNU project, not Free Software in general. However, as others pointed out, there are currently only two compilers which support C99, and both are proprietary (or at least controlled by a not-exactly-free-software-friendly company). Also, both of these compilers only target a very limited set of operating systems and CPUs (e.g. Oracle Solaris Studio only targets 5 platforms (Solaris/Sparc, Solaris/x86, Solaris/AMD64, Linux/x86, Linux/AMD64) unlike GCC, for example, which targets ... well actually I have no idea how many platforms it targets, but AFAIK it's well over 50), so by requiring C99, you would not only limit your software to two compilers, but also a small set of platforms, again, many proprietary.

Note that there are subsets of C99 which are much more widely supported, for example in GCC.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.