From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by passt.top (Postfix) with ESMTP id 5B8AD5A026F for ; Tue, 1 Aug 2023 10:15:33 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1690877732; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=NJtH18vLDOCQDkBIvTEPVmLAfh1PleNo8DT4U3lcsxk=; b=F1SVcbjNaI1oHh+7b9mpa3gXNqFPKTJ77TkUIxg4/SkGUO6Sh4bjjf4NS17/eie6uopvCe iE03ESVqFVH+qSA1Qp4WKqlQFWRXpdogD1aMutVcriHdGEQPrWJxlaOM8KLr5wIVY/AGSK b3ARnxwH0UsZrL4IUq1hxXUa9eEsOQQ= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-557-lP1M3BvlPVWTYH9tYdk8zA-1; Tue, 01 Aug 2023 04:15:31 -0400 X-MC-Unique: lP1M3BvlPVWTYH9tYdk8zA-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id AEEAA88D0F7; Tue, 1 Aug 2023 08:15:30 +0000 (UTC) Received: from elisabeth (unknown [10.39.208.24]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D51334A9004; Tue, 1 Aug 2023 08:15:29 +0000 (UTC) Date: Tue, 1 Aug 2023 10:15:27 +0200 From: Stefano Brivio To: David Gibson Subject: Re: [PATCH 0/3] RFC: Allow C11 extensions in the passt/pasta code Message-ID: <20230801101527.6cbdc8fa@elisabeth> In-Reply-To: <20230801033647.2135844-1-david@gibson.dropbear.id.au> References: <20230801033647.2135844-1-david@gibson.dropbear.id.au> Organization: Red Hat MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.10 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-ID-Hash: RWKJUY3TGZBS6PLAJ7BOU5CDP6IBPG6P X-Message-ID-Hash: RWKJUY3TGZBS6PLAJ7BOU5CDP6IBPG6P X-MailFrom: sbrivio@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: passt-dev@passt.top X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On Tue, 1 Aug 2023 13:36:44 +1000 David Gibson wrote: > As discussed on our recent calls, the C11 standard introduces > anonymous structure and union members and static assertions, amongst > other things. Both of these could be useful in a few places in > passt/pasta to make the code more readable and safer. > > However, at the moment, the compiler flags we use only allow C99 code. > This series allows C11 code, and makes some fairly obvious cleanups by > using it. > > It would be nice to get an opinion on this reasonably quickly, because > I have other patches in the works that will look different depending > on whether or not they can use C11 features. ...then let me start with this one, as it's straightforward: I think anonymous unions and structures are great. :) The series (especially 2/3) looks good to me, I'll push it in a bit. We also need to check for issues with reasonably older gcc (perhaps those we have in the test/distro tests, at least) and clang versions, unless you already did that. -- Stefano