Re: Depending on C99 (Re: GtkBindingSignal changes)



On 06.01.2006 09:24, muppet wrote:

On Jan 5, 2006, at 9:52 PM, Owen Taylor wrote:

The main reason requiring C99 might be that most or all of
the developers are now using C99 compilers and aren't able to catch
slip-ups. It's hard to support something that we don't test with.


Add "--std=c89" to your CFLAGS.  It catches lots of stuff.  ;-)

(This machine doesn't have GCC's info pages installed or i'd paste from the manual...)

Given that it does *not* catch the IMHO most annoying issue it appears to
be rather useless. The one common thing it catches - i.e. single line
comments - is accepted by all compilers I use ...

5.24 Mixed Declarations and Code
================================

ISO C99 and ISO C++ allow declarations and code to be freely mixed
within compound statements.  As an extension, GCC also allows this in
C89 mode.  For example, you could do:

     int i;
     /* ... */
     i++;
     int j = i + 2;

   Each identifier is visible from where it is declared until the end of
the enclosing block.                                    [gcc-3.3.5 info]


-------- Hans "at" Breuer "dot" Org -----------
Tell me what you need, and I'll tell you how to
get along without it.                -- Dilbert



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