[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 0/7] Remove pre ANSI c89 code
From: |
Markus Armbruster |
Subject: |
Re: [Qemu-devel] [PATCH 0/7] Remove pre ANSI c89 code |
Date: |
Wed, 23 Sep 2009 18:11:42 +0200 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.3 (gnu/linux) |
Juan Quintela <address@hidden> writes:
> Hi
>
> In commemoration of the 20th anniversary of the c89 standard, this brings
> qemu codebase to c89. How do I know?
>
> Previous to last patch adds to QEMU_CFLAGS:
> -Wold-style-declaration -Wold-style-definition
>
> Why?
> - typedef abuse for the 1st patch. How that ever worked, I don't know.
> - gcc gets picky, and you have to declare functions as:
> static inline void f(...)
> inline static void f(...)
> but
> static void inline f(...)
> gets warnings. Just move the few functions that have the third
> format to the 1st one.
> - bring alpha-dis.c and sh4-dis.c to ansi c89 function declaration.
> - static + const: gcc wants you to use:
> static const
> and gives a warning for
> const static
> - same for static + __thread (only 1 occurrence)
> - last patch removes PARAMS() from dis-asm.h
> last users were alpha-dis.c and sh4-dis.c (do you start to see a
> pattern here).
>
> Last one is not required, but as qemu is not going to compile in pre-c89
> compiler any time soon, it is better to also apply it.
>
> Later, Juan.
None of these are incorrect C89, just terribly old-fashioned and/or bad
style. Good cleanup.
- [Qemu-devel] [PATCH 1/7] Use proper typedef syntax, (continued)
[Qemu-devel] [PATCH 7/7] Remove PARAMS() macro, Juan Quintela, 2009/09/22
Re: [Qemu-devel] [PATCH 0/7] Remove pre ANSI c89 code,
Markus Armbruster <=