From: Christian Schoenebeck <qemu_oss@crudebyte.com>
To: Andrey Erokhin <language.lawyer@gmail.com>, Greg Kurz <groug@kaod.org>
Cc: qemu-devel@nongnu.org
Subject: Re: [PATCH v2] 9pfs: local: read native symlinks when security-model=mapped
Date: Tue, 25 Nov 2025 20:31:32 +0100 [thread overview]
Message-ID: <13893778.uLZWGnKmhe@weasel> (raw)
In-Reply-To: <20251125195819.5bf1e051@bahia>
On Tuesday, 25 November 2025 19:58:19 CET Greg Kurz wrote:
> On Tue, 25 Nov 2025 19:21:00 +0500
>
> Andrey Erokhin <language.lawyer@gmail.com> wrote:
> > >> + native_symlink:;
> > >
> > > Still has the terminating but unneeded semicolon
> >
> > I think I've addressed this in the v1 thread, with links to the C11 draft
> > grammar. Can repeat in plain English: a label shall be followed by a
> > statement. (No, declaration is not a statement)
> My bad, I didn't see your answer.
>
> It is funny that I had to pass -pedantic to gcc to get a complaint (in plain
> English as well) if I drop the semicolon :
>
> warning: a label can only be part of a statement and a declaration is not a
> statement [-Wpedantic]
>
> Cheers,
Yes, I noticed that as well. GCC compiles fine without the semicolon, clang
OTOH errors:
../hw/9pfs/9p-local.c:481:9: error: expected expression
char *dirpath = g_path_get_dirname(fs_path->data);
^
Anyway, Andrey is right of course. The C standard defines a "labeled-
statement" as
identifier : statement
...
and the subsequent line in the patch is a declaration, not a statement.
But I also understand if GCC developers relaxed this rule. Because it "feels"
like both, a declaration and a statement. Interesting, because usually it's
clang to be more relaxed than GCC.
/Christian
next prev parent reply other threads:[~2025-11-25 19:32 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-22 20:19 [PATCH v2] 9pfs: local: read native symlinks when security-model=mapped Andrey Erokhin
2025-11-25 14:04 ` Greg Kurz
2025-11-25 14:21 ` Andrey Erokhin
2025-11-25 18:58 ` Greg Kurz
2025-11-25 19:31 ` Christian Schoenebeck [this message]
2025-11-25 20:40 ` Andrey Erokhin
2025-11-26 12:26 ` Christian Schoenebeck
2025-11-28 10:23 ` Christian Schoenebeck
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=13893778.uLZWGnKmhe@weasel \
--to=qemu_oss@crudebyte.com \
--cc=groug@kaod.org \
--cc=language.lawyer@gmail.com \
--cc=qemu-devel@nongnu.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).