From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id CA57F385840D for ; Tue, 23 Apr 2024 18:05:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org CA57F385840D Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org CA57F385840D Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713895507; cv=none; b=D9uk/u8YNHyYJmcNd9SsyybfEKiez5sITXIzVpkPKWPBcM5d9i0J3wrMrKGQpRXNlAezvOKr6L6giMSdz9hh9whePhEE0dNMcD2R+WIQ03imfGsI18DTk1er6E6weHEpFNoI0t2hStL6cH6fLDP3nsOoD9g2xw5u7EhjFdHc1q0= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713895507; c=relaxed/simple; bh=66CVlbAF2FdYRarH9xtBUxcM/OyHyIVs5tAMtmLHNl8=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=vr/SVCN3VndymMrxs+SFSmFxBnuBo53j7pSlfHPuR1sAGNe+/DCsndN8LZtdb0s4/WUYmtUgiaqXakIcZN4FIKjpMdvVQxa3cQdX3ZmUj8S77zDesi7nmUQJD3Rqucekuck0EEg7APJ0A26z8i0SwOmkSC+Tndcv5l+Fj9s3q3w= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1713895505; 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: in-reply-to:in-reply-to:references:references; bh=u8XmrNNKzYDyjfAv/zb05Ev/lMGSr9g7G2uEo7cCaZM=; b=HC0rXl6Db7E0qupM6nRGvUxoFdx/2zxFosYWE/4hsVNpm8g7nTn19Sw+1FDnJmXT4+eGhP zZzikNvtNBJXfOZBf6kPz2zkIl/1bVdNVWj/iZ3iKd3GxI7AP+/IuKSsTUZ8W4954KDJ03 p4CwKenOVyQZQHx83wyXYxqYpZ1HHcc= Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-68-fx3DNLMYOaa_seMkogy8Rw-1; Tue, 23 Apr 2024 14:05:03 -0400 X-MC-Unique: fx3DNLMYOaa_seMkogy8Rw-1 Received: by mail-wr1-f69.google.com with SMTP id ffacd0b85a97d-343da0a889dso5358840f8f.0 for ; Tue, 23 Apr 2024 11:05:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713895501; x=1714500301; h=mime-version:references:message-id:in-reply-to:subject:cc:to:from :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=u8XmrNNKzYDyjfAv/zb05Ev/lMGSr9g7G2uEo7cCaZM=; b=OHF4GtfE034A9TsjI8zLk+fIooIXFoZNj3kg8uUJeSUxnL3b6dA79yY0stpIiV53GS uqx4HA6b8486U1v/2WMZXfyTvCqlRoFIEvdkZGRd7rLMVR6TVVQ2KW1jSa+3zZY8/KiQ LjJNl0pSnAcXqw2JuHf2+4plQv8oe+AhJQlz+vy3jqBkLHsG05MtANskRQw82lUH+zeT Y+xyIPs6ENdvkAJdzrccW4enanICilmtXNMlb6DCq4ZjuhgJgnGU1i5jnKqDfYlkh3+W 6fud46BcNrKpKP1ge2SPKnT38b31HT+uZBjlVr6laWWB86zjYrtuQzBmUKmwUOjIKU1l EEmA== X-Forwarded-Encrypted: i=1; AJvYcCV5hUzmWtYzTIWgWvAqAT9X325KAW46uH4j+YjE9T5wz5SmnM76AuMvZmMhtLr22wj/VbyJ+QfJsylbn3JdvMtIkF/46MsK1A== X-Gm-Message-State: AOJu0Yxqe4Mkuq1EvTvuUiOcTwdvxP6fCUdf5B8l2fP1TCkqk5q0p1Fy CJKIJGG+vhRi7SvCtqrT/LCFOB/kl06YDEk6uyS9XZ6cD3DrIBzM96h9pORkGHqo0AvlJjx/qxg znP4sikYymXDBgFvzwevcHtDPd9YdTHIxQmrFdv/0KvnyhLl0LfzpGSQ= X-Received: by 2002:adf:f9c7:0:b0:349:d779:3d60 with SMTP id w7-20020adff9c7000000b00349d7793d60mr12210368wrr.57.1713895501539; Tue, 23 Apr 2024 11:05:01 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFCFIl5YlV7kW2LQG1hqkGQIEUYMWnK8DNrXXgpLRRh0C8QHc9wDW0dnRg0Bo6A/5YdP3vWpA== X-Received: by 2002:adf:f9c7:0:b0:349:d779:3d60 with SMTP id w7-20020adff9c7000000b00349d7793d60mr12210352wrr.57.1713895501130; Tue, 23 Apr 2024 11:05:01 -0700 (PDT) Received: from digraph.polyomino.org.uk (digraph.polyomino.org.uk. [2001:8b0:bf73:93f7::51bb:e332]) by smtp.gmail.com with ESMTPSA id hg12-20020a05600c538c00b00415dfa709dasm20860587wmb.15.2024.04.23.11.05.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Apr 2024 11:05:00 -0700 (PDT) Received: from jsm28 (helo=localhost) by digraph.polyomino.org.uk with local-esmtp (Exim 4.95) (envelope-from ) id 1rzKVC-001w4f-VI; Tue, 23 Apr 2024 18:04:22 +0000 Date: Tue, 23 Apr 2024 18:04:22 +0000 (UTC) From: Joseph Myers To: Qing Zhao cc: richard.guenther@gmail.com, uecker@tugraz.at, siddhesh@gotplt.org, keescook@chromium.org, gcc-patches@gcc.gnu.org Subject: Re: [RFC][PATCH v1 1/4] Documentation change In-Reply-To: <20240419184317.2138890-2-qing.zhao@oracle.com> Message-ID: <74e0a96c-fa13-7fae-85e1-6e9efb28f4e@redhat.com> References: <20240419184317.2138890-1-qing.zhao@oracle.com> <20240419184317.2138890-2-qing.zhao@oracle.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-3.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Fri, 19 Apr 2024, Qing Zhao wrote: > +The size of the union is as if the flexiable array member were omitted > +except that it may have more trailing padding than the omission would imply. "trailing padding" is more a concept for structures than for unions (where padding depends on which union member is active). But I suppose it's still true that the union can be larger than without the flexible member, because of alignment considerations. union u { char c; int a[]; }; needs to be sufficiently aligned for int, which means the size is a multiple of the size of int, whereas if the flexible array member weren't present, the size could be 1 byte. -- Joseph S. Myers josmyers@redhat.com