This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: ToT glibc build problem with ToT GCC
- From: Szabolcs Nagy <Szabolcs dot Nagy at arm dot com>
- To: Florian Weimer <fweimer at redhat dot com>, Carlos O'Donell <carlos at redhat dot com>
- Cc: nd <nd at arm dot com>, Martin Sebor <msebor at gmail dot com>, Steve Ellcey <sellcey at marvell dot com>, "libc-alpha at sourceware dot org" <libc-alpha at sourceware dot org>, "msebor at redhat dot com" <msebor at redhat dot com>
- Date: Fri, 30 Aug 2019 14:14:42 +0000
- Subject: Re: ToT glibc build problem with ToT GCC
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=D9RHnxlP/RpAjbv39In+YL8L4IOxniJn5EhcjO3Lqn4=; b=GEJnMyYAZoIH/nC+bq161bS2x503avycK5Rhifaa5y8H6jc4jdXsA24OpXCazuh0j76MZzbSwHznJvHPQccvkR/IIEYbOZTh7fjisLfAlYr6+4G+3kmlnOkQjGyQyI1r+pt8UpaLiW/RRfIDXxzYAgXFCYiXKCI/KdVTKhHpJsYiLjCulDPj64jZPWu/OrBxjbbSKV7LH5xOSAjWHLTE8CGBr1IaYm6pJK3BCvbsefqv+VeuyflvZLrQptvl43Ma1bxBERO7WQbe3YmcqCklIGU+jVpfu238d/ayOWECxvCuGYE15EoLttwulgxaGOMi7/xg1RCY1Lx9LWHX0QXSCw==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NurUoNViEoA2GlK+Aoa4gpZ8fxPnjNUqrxTzjOLGnwB0xn0ro9pv4mUfCDBqc1EtZetl4TF6SsqKtijK5Zu/zryM4gqtfZ8w4DtUrWuDzNcL5gK9FvKNgb1JiEMwMgqqKtxjzo+MFmQSI05nRl9X/NZSFFh/Xkn50tM4dhHJMvdhLoqYeHc2tzaQY9SKNDb0ZR3zlleZw9Q/yXlHMV4r+jxoaTPsrWApMZKocS9PqqRZYoMe86EWruOxQrqMY3h5Xw5HwluYHFXPUAQ2UGn/VNWjb/se+0zkvKUiI9a5YAwBnufEDa3JiaCV5noCGSxj8pVSSo1KBBt+9s3rWMkYGw==
- Original-authentication-results: spf=none (sender IP is ) smtp.mailfrom=Szabolcs dot Nagy at arm dot com;
- References: <486309d08583ed1c27a001d946205850b421f7ad.camel@marvell.com> <53b36206-3f07-432b-9d0f-02520debe4b8@gmail.com> <d96c9e5d-18f6-9c55-cd49-334c3d449a5b@redhat.com> <2e5c0137-4109-e7ce-8d1d-9c268e086f81@gmail.com> <f67a431b-0d15-644a-c5cd-8cf2ccf8e270@redhat.com> <87ef126bvu.fsf@oldenburg2.str.redhat.com>
On 30/08/2019 14:06, Florian Weimer wrote:
> * Carlos O'Donell:
>
>> Is there a viable solution for a static allocation of a structure
>> that ends in a VLA?
>
> Sure, use an initializer. Not sure if this breaks anything. The test
> suite is clean.
>
> (GNU C obviously didn't support that when the code was written.)
i didn't know an initializer would be enough.
>
> - replace[0].nbytes = 1;
> - replace[0].bytes[0] = '?';
> - replace[0].bytes[1] = '\0';
> - ctype->mboutdigits[cnt] = &replace[0];
> + static const struct charseq replace =
> + {
> + .nbytes = 1,
> + .bytes = { '\0' },
> + };
> + ctype->mboutdigits[cnt] = (struct charseq *) &replace;
> }
is it ok to change {'?','\0'} to {'\0'} ?