michel at daenzer.net
Thu Oct 4 07:18:37 PDT 2012
ng K&R-style prototypes?
X-BeenThere: xorg at lists.freedesktop.org
List-Id: Discuss issues related to the xorg tree <xorg.lists.freedesktop.org>
<mailto:xorg-request at lists.freedesktop.org?subject=unsubscribe>
List-Post: <mailto:xorg at lists.freedesktop.org>
List-Help: <mailto:xorg-request at lists.freedesktop.org?subject=help>
<mailto:xorg-request at lists.freedesktop.org?subject=subscribe>
X-List-Received-Date: Wed, 27 Jul 2005 17:02:39 -0000
Jesse Barnes wrote:
>On Wednesday, July 27, 2005 12:24 am, Donnie Berkholz wrote:
>>Philip Prindeville wrote:
>>| Is there any reason to keep the few existing instances of
>>| K&R-style prototypes? There are even files which mix ANSI
>>| and K&R prototypes...
>>| It would be relatively straightforward to convert over to
>>| completely ANSI style prototypes as part of a clean up.
>>I'm certainly not aware of any reasons not to, as a bunch of code
>>already has been converted. If you do end up going ahead with this,
>>take a look at Thomas Dickey's excellent ansification guide .
>There are potential calling convention gotchas to worry about, as I
>understand it, but it should probably be done eventually (sooner the
>better imo). Sounds like good post-7.0 cleanup work to me.
There is at least one way around this.
Have the tool extract the old declarations into a header file (or many
header files) and then load them up with -imacros "old_header_decls.h"
on the command line. The compiler will then complain (when the
-Wconversion flag is present) of any changed semantics implied by the
conflict of the two different declaration types.
Otherwise, elint might be able to catch these.
More information about the xorg