[Glade-users] Re: Traditional C rejects ISO C



* no6 pobox com (number6 ip120 gte156 dsl-acs2 sea iinet com) wrote:
What's "traditional C?"  Is that K&R C, or the C formerly known as
c89, ANSI X3.159-1989?  Then there is ISO C, ISO/IEC 9899:1990.
Then there is C99, ISO 9899:1999.  

Good question, I don't know. All I know is what I get in the warning.

For the purposes of your question, I'd imagine you are refering to 
ISO C as c99 and "traditional C" as c89.  As K&R C does not support
function prototypes, I cannot imagine you are using that original oldie
but goodie.

A good description of the differences between c99 and c89 can be found here:

  http://www.fact-index.com/c/c_/c_programming_language.html

These seem to be the most important differences:

The new features in C99 include:
    * inline functions
    * freeing of restrictions on the location of variable 
      declarations (as in C++)
    * addition of several new data types, including long long 
      int (to reduce the pain of the looming 32-bit to 64-bit transition),
      an explicit boolean data type, and a complex type representing complex
      numbers
    * variable-length arrays
    * official support for one-line comments beginning with //, 
      borrowed from C++
    * several new library functions, such as snprintf()
    * several new header files, such as stdint.h

Interestingly, gcc supports most of c99, but Borland and Microsoft C don't.

I thank you for your reply, however it doesn't really answer my
question. First, I'm only using gcc, so Borland and MS C don't count.
Second, I'm obviouslly using gcc's -Wtraditional setting for these
errors to come up, so my question was: how do I get rid of these errors
so that everything works correctly while still using -Wtraditional?
Should I even be using -Wtraditional?

-- 
 .''`.      Carl B. Constantine
: :' :     duckwing duckwing ca
`. `'    GnuPG: 135F FC30 7A02 B0EB 61DB  34E3 3AF1 DC6C 9F7A 3FF8
  `-  Debian GNU/Linux -- The power of freedom
  "Claiming that your operating system is the best in the world because more
  people use it is like saying McDonalds makes the best food in the world."




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]