From: Markus Armbruster <armbru@redhat.com>
To: Juan Quintela <quintela@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 0/7] Remove pre ANSI c89 code
Date: Wed, 23 Sep 2009 18:11:42 +0200 [thread overview]
Message-ID: <87eipxiqtd.fsf@pike.pond.sub.org> (raw)
In-Reply-To: <cover.1253661009.git.quintela@redhat.com> (Juan Quintela's message of "Wed\, 23 Sep 2009 01\:18\:58 +0200")
Juan Quintela <quintela@redhat.com> 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.
prev parent reply other threads:[~2009-09-23 16:11 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-22 23:18 [Qemu-devel] [PATCH 0/7] Remove pre ANSI c89 code Juan Quintela
2009-09-22 23:18 ` [Qemu-devel] [PATCH 1/7] Use proper typedef syntax Juan Quintela
2009-09-23 0:24 ` [Qemu-devel] " Måns Rullgård
2009-09-22 23:19 ` [Qemu-devel] [PATCH 2/7] static and inline should came before the type of the functions Juan Quintela
2009-09-22 23:19 ` [Qemu-devel] [PATCH 3/7] Bring two last users of K&R definitions to ANSI c89 Juan Quintela
2009-09-22 23:19 ` [Qemu-devel] [PATCH 4/7] gcc wants 1st static and then const Juan Quintela
2009-09-22 23:19 ` [Qemu-devel] [PATCH 5/7] __thread should be before real type Juan Quintela
2009-09-22 23:19 ` [Qemu-devel] [PATCH 6/7] Add -Wold-style-declaration -Wold-style-definition to QEMU_CFLAGS Juan Quintela
2009-09-23 8:48 ` Laurent Desnogues
2009-09-23 16:09 ` Markus Armbruster
2009-09-23 17:16 ` Blue Swirl
2009-09-29 23:15 ` [Qemu-devel] " Juan Quintela
2009-09-22 23:19 ` [Qemu-devel] [PATCH 7/7] Remove PARAMS() macro Juan Quintela
2009-09-23 16:11 ` Markus Armbruster [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87eipxiqtd.fsf@pike.pond.sub.org \
--to=armbru@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.