C99

This is a discussion on C99 within the C Programming forums, part of the General Programming Boards category; Is C99 even worth switching to? I can't even find a compiler for the windows platform. It is backwards compatable ...

  1. #1
    Registered User
    Join Date
    Jun 2008
    Posts
    127

    C99

    Is C99 even worth switching to? I can't even find a compiler for the windows platform. It is backwards compatable isn't it?

  2. #2
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    gcc is C99 compatible - there are possibly others, but I think MSVC is NOT C99 compatible, but it has some cherry-picked inclusions from C99. Whether it is "worth switching to" is a different question, of course - this can only be answered if we understand why you are wishing to use C99 in the first place - I can think of a few different reasons, but I don't know which one you have in mind:
    1. You want to learn C99 standard to expand your knowledge.
    2. You have code than is written in C99, and it won't compile in C89.
    3. You somehow think that C99 will dramatically improve the effort needed to write some code.

    And yes, C99 is very much backwards compatible - at least as long as we discuss defined behavior. If you rely on undefined behavior, then it may change (one of those may be that not having a return in main would in the old times return some "random" number, whilst now it returns zero - but if you rely on that, what's to say that the "random" number doesn't become zero for other reasons when you recompile with a different compiler - or even different compiler settings).

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  3. #3
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,185
    Quote Originally Posted by herWter View Post
    Is C99 even worth switching to? I can't even find a compiler for the windows platform. It is backwards compatable isn't it?
    You must not have looked very hard. There's Comeau, of course, but you have to pay for that. I think Intel's supports C99 as well, but I don't know (and that you have to pay for too). gcc is pretty darn close (if you don't plan to use complex numbers or VLA, then you're golden) -- and that's the compiler behind Dev-C++ and C::B.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. c99
    By Nextstopearth in forum C Programming
    Replies: 8
    Last Post: 02-20-2009, 10:58 PM
  2. C89 or C99
    By talin in forum C Programming
    Replies: 6
    Last Post: 05-26-2008, 12:45 PM
  3. C99 and int main()
    By cwr in forum C Programming
    Replies: 8
    Last Post: 09-19-2005, 06:54 AM
  4. C99 support?
    By Devil Panther in forum C Programming
    Replies: 3
    Last Post: 08-22-2005, 02:07 PM
  5. My first game
    By homeyg in forum Game Programming
    Replies: 20
    Last Post: 12-22-2004, 04:25 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21