From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dog.elm.relay.mailchannels.net (dog.elm.relay.mailchannels.net [23.83.212.48]) by sourceware.org (Postfix) with ESMTPS id B0F413858C5F for ; Fri, 3 Feb 2023 04:25:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B0F413858C5F Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=gotplt.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gotplt.org X-Sender-Id: dreamhost|x-authsender|siddhesh@gotplt.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 2ECE92015B9; Fri, 3 Feb 2023 04:25:06 +0000 (UTC) Received: from pdx1-sub0-mail-a307.dreamhost.com (unknown [127.0.0.6]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 6DFEB2016AA; Fri, 3 Feb 2023 04:25:05 +0000 (UTC) ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1675398305; a=rsa-sha256; cv=none; b=61rj0swToLOKVv3bTUFEvc94gCmsekbPy6o2tRBlgiVR6JCzDBO4HWHYVJn4JG3a8Nk2GA Lv2UHzMbapfk1PLyG4VJ2VvmsIVWBhJsmR+D9oyhQHn6cDtlxD0RHxsKbIRncxVbNvUSlm EFfkqmhtxOkKJ5jAPlFIVc3tKgatsX9zqNq+BrXIr3zMq304OtNAb6iJYRNHrW+Bn8dtDS Qkx8PHfgYsMXQISfnTKFmOPGcmrkj8Oi6lG0ZbqRklUWokmd/WIS/TbuRU28TlYrIIKg0S YAhy+QHNyMLDR3apWWplwSBu6qC55h3vgkUDcJJ9286fDiKOiNEZ4h7EPE/hbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1675398305; 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:dkim-signature; bh=cEZtq9kPRvPaBTlanjthN/o46apHi8setbnX5cyWJlE=; b=M381A7ArlYWdjnFHwzK5YKHeVvJUOPyZcgTtwWMYR19R+LL2NsNqLKQYKPQVCzyCmuCjOm 6hXnaMjkU1yyiXeWk4pHThnAQ/EhN73yuugfgP0x8L8zU9hIFSpOpWumUbhns4DLBk0ieu OdhD9euWy2yMesDZrwj57ptrjzh0AT356B788BvtvgF3hpvPl9Eh2RuIVw97M3DM0PPuKO fitpL1O5JYdGUl/Zb3ZhXDXOy2ibZxoRE9ZJZtRBoLcXiNxA9rit1kJBrsganjTVu7fz7C T0tzDmCpsX3Xydnwbep/CfnuQyORJiI1uQG7MnYnoStmq/e58sEdzGG4ZqgIFA== ARC-Authentication-Results: i=1; rspamd-5fb8f68d88-7bk62; auth=pass smtp.auth=dreamhost smtp.mailfrom=siddhesh@gotplt.org X-Sender-Id: dreamhost|x-authsender|siddhesh@gotplt.org X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|siddhesh@gotplt.org X-MailChannels-Auth-Id: dreamhost X-Imminent-Inform: 3e7325b75f3303a1_1675398305990_3589793466 X-MC-Loop-Signature: 1675398305990:2925955837 X-MC-Ingress-Time: 1675398305989 Received: from pdx1-sub0-mail-a307.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.99.229.28 (trex/6.7.1); Fri, 03 Feb 2023 04:25:05 +0000 Received: from [192.168.0.182] (bras-vprn-toroon4834w-lp130-07-174-93-43-36.dsl.bell.ca [174.93.43.36]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) (Authenticated sender: siddhesh@gotplt.org) by pdx1-sub0-mail-a307.dreamhost.com (Postfix) with ESMTPSA id 4P7My7579Wz5k; Thu, 2 Feb 2023 20:25:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gotplt.org; s=dreamhost; t=1675398304; bh=cEZtq9kPRvPaBTlanjthN/o46apHi8setbnX5cyWJlE=; h=Date:Subject:To:Cc:From:Content-Type:Content-Transfer-Encoding; b=A7OhsCH3qrDW5NgT291enakON7AprRwAjYOU3U6oSXpX/XrmuQ/g4+6oKSoBaf4zQ BiJnlGWN0PNCcb04Cih7fnXzTxG/57Ve4oO+ZuM2DpCSz/BglOqO08dcLM/SvdwUqr lPa7+hPo1z3atOkp+sbxaBs/AOBsYR88kVaZ+BHFHHoQ91QaXTGK6CZ1V7umNPgEtl xmm1Zn4lq9gyNvIVRUZOPDWaStJAxfFkvJ4k6/KgArR8LtJKL91ZyZwa4O1XqxVKp4 jdvO1DYSuKvdkNH8ekCIcmS6dJlBNWboapHFfIVcHeynokHIR6t84HXYwznQW2FvZM ZgRlHGsU082vA== Message-ID: <870439b5-0eca-608e-ddcc-ec885ac3f6b8@gotplt.org> Date: Thu, 2 Feb 2023 23:25:02 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.0 Subject: Re: [PATCH 2/2] Documentation Update. Content-Language: en-US To: Richard Biener Cc: Qing Zhao , gcc Patches , "keescook@chromium.org" , "Joseph S. Myers" References: <20230131141140.3610133-1-qing.zhao@oracle.com> <20230131141140.3610133-3-qing.zhao@oracle.com> <1AB22124-10D2-416D-B1BD-D4FF728AB0E2@oracle.com> From: Siddhesh Poyarekar In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3031.2 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,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 2023-02-02 03:33, Richard Biener wrote: > looking at PR77650 what seems missing there is the semantics of this > extension as expected/required by the glibc use. comment#5 seems > to suggest that for my example above its expected that > Y.x.data[0] aliases Y.end?! There must be a better way to write > the glibc code and IMHO it would be best to deprecate this extension. > Definitely the middle-end wouldn't consider this aliasing for > my example - maybe it "works" when wrapped inside a union but > then for sure only when the union is visible in all accesses ... > > typedef union > { > struct __gconv_info __cd; > struct > { > struct __gconv_info __cd; > struct __gconv_step_data __data; > } __combined; > } _G_iconv_t; > > could be written as > > typedef union > { > struct __gconv_info __cd; > char __dummy[sizeof(struct __gconv_info) + sizeof(struct > __gconv_step_data)]; > } _G_iconv_t; > > in case the intent is to provide a complete type with space for > a single __gconv_step_data. I dug into this on the glibc end and it looks like this commit: commit 63fb8f9aa9d19f85599afe4b849b567aefd70a36 Author: Zack Weinberg Date: Mon Feb 5 14:13:41 2018 -0500 Post-cleanup 2: minimize _G_config.h. ripped all of that gunk out. AFAICT there's no use of struct __gconv_info anywhere else in the code. I reckon it is safe to say now that glibc no longer needs this misfeature. Sid