qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Christian Schoenebeck <qemu_oss@crudebyte.com>
To: Greg Kurz <groug@kaod.org>, Andrey Erokhin <language.lawyer@gmail.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [PATCH v2] 9pfs: local: read native symlinks when security-model=mapped
Date: Wed, 26 Nov 2025 13:26:22 +0100	[thread overview]
Message-ID: <4695171.LvFx2qVVIh@weasel> (raw)
In-Reply-To: <88fca96d-c083-4fea-a5dd-619d3e053812@gmail.com>

On Tuesday, 25 November 2025 21:40:57 CET Andrey Erokhin wrote:
> On 26/11/2025 00:31, Christian Schoenebeck wrote:
> > On Tuesday, 25 November 2025 19:58:19 CET Greg Kurz wrote:
[...]
> > 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.
> 
> Probably GCC allowed mixing declarations and statements in a block way
> before C99, in C++-like way, which has statement → declaration-statement →
> block-declaration production (C99+ uses block-item → declaration|statement)

It's not that old. It was introduced by the following commit in GCC, simply 
because the C23 standard now allows labels to "appear before declarations and 
at the end of compound statements.":

commit 8b7a9a249a63e066cff6e95db05a3158b4cc56cc
Author: Martin Uecker <muecker@gwdg.de>
Date:   Sat Nov 7 00:48:33 2020 +0100

    C Parser: Implement mixing of labels and code.
    
    Implement mixing of labels and code as adopted for C2X
    and process some std-attributes on labels.
    [...]


And in fact, clang -std=c23 accepts it without error or warning as well.

/Christian




  reply	other threads:[~2025-11-26 12:27 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
2025-11-25 20:40         ` Andrey Erokhin
2025-11-26 12:26           ` Christian Schoenebeck [this message]
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=4695171.LvFx2qVVIh@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).