[Top][All Lists]

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

Re: RFC: status icon support

From: David Kastrup
Subject: Re: RFC: status icon support
Date: Sat, 12 Jan 2008 15:19:00 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.50 (gnu/linux)

Andreas Schwab <address@hidden> writes:

> David Kastrup <address@hidden> writes:
>> Andreas Schwab <address@hidden> writes:
>>> David Kastrup <address@hidden> writes:
>>>> Richard Stallman <address@hidden> writes:
>>>>>     Please no K&R in new code.  
>>>>> We have no policy against K&R style.  I recently accepted non-K&R
>>>>> function definitions in Emacs sources, but I still do not particularly
>>>>> like it.  K&R style is easier to read anyway.
>>>> It stops the compiler from doing type checking and type conversions, for
>>>> one thing.
>>> Unless you add prototypes.
>> In which case you have
>> a) undefined behavior (the compiler need not check whether the prototype
>>    matches the function declaration).
> There is nothing undefined in old-style function defintions.

There certainly is.  If they don't match the prototype, the compiler is
free to do whatever it thinks correct.  It is not required to generate
an error.

>> b) not K&R compatible C, so where is the point?
> The Emacs sources use macros that keep prototypes from being visible
> from obsolte compilers.

We stopped mandating this.

> What's your point?

Where is the point in combining a prototype that won't compile under K&R
compilers with a K&R definition (which won't compile under C++ or newer
standard compilers)?

David Kastrup, Kriemhildstr. 15, 44793 Bochum

reply via email to

[Prev in Thread] Current Thread [Next in Thread]