From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Adhemerval Zanella Newsgroups: gmane.comp.lib.glibc.alpha Subject: Re: Fix two more -Os strcoll / wcscoll build failures Date: Tue, 27 Feb 2018 10:34:36 -0300 Message-ID: References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1519738367 1806 195.159.176.226 (27 Feb 2018 13:32:47 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 27 Feb 2018 13:32:47 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 To: libc-alpha@sourceware.org Original-X-From: libc-alpha-return-90661-glibc-alpha=m.gmane.org@sourceware.org Tue Feb 27 14:32:43 2018 Return-path: Envelope-to: glibc-alpha@blaine.gmane.org DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:subject:to:references:from:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; q=dns; s=default; b=i/1TC8RIXzU0VlJH jXSku2q7GdVvboAKJQNfhp34FBEtvp206SbQ5eutlxebPX40/4C7UDaHbvSpOXKZ qiZ7EGbs4Lq/tKurhjsc6OE3tt6bAMJBKKE2xkui9OcQ5jHofNKdMAxpLTa8PvJg /xDOmI3zxpAO3PyBxyZyP7gCh3E= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:subject:to:references:from:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; s=default; bh=n6/fx9dugeIPnd9tPoxZEZ 76QfI=; b=TMe7Z7n7IF4tzTklNE3ur7bTvuduJ6qpVC8wUWAB6gSna2JIx2lfEf bi9NwhIKp4ayFhu8Stx6wr7un4MFEh+KtpgfuUviAoaZdX+gj+NohaLYQQHdZrTT liA8M32HmO4UqUJjcYW70ekGGe466Ss3kYzJUCxA8EQI3H9spJZw8= Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Original-Sender: libc-alpha-owner@sourceware.org Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.1 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE,SPF_PASS,URIBL_RED autolearn=ham version=3.3.2 spammy=Hx-languages-length:2136 X-HELO: mail-qk0-f178.google.com X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=QJA69KG98d2g9sTYWEXGoXlotXRlHyRu1OpuCInbEng=; b=jQrgKHM26rTIxolOddHFEGbinYBDUUURV22NIpKMnQWhbcKwaLySEmFRGgeMaTw9TE HTh1F39JS++9g4F0ZjL0mDuDLnUXYENr5tMdjhgtQIt0TXhgbA10N6pwZnwRz3GwAw0J hX0ytrNQ3S/ej5v1bwXqYZrtQJT11sxvrhF6loKTmzfJBI+3TQ4XXmRn30DY81/981mu wA4vid4ZFyhD7lnVUCbFxV17lNaU4vo7TyeIPPp7VTiCnt3e2dJd1pt57KPB/IlgCdZj L0b7fKnGnMCgXcU2KjFqMKFbU4zuI5uyQKn4P9HZYCkNp2ELZQJ4gfDrJbeWxiiL+2BG fzSQ== X-Gm-Message-State: APf1xPAsDElzW8TMzz5f/5+w+DG9Sq6MR/226/Nn7qydGjt8pDljFGx/ XgfhF8CjUHQUMn2uZcIxKYfzwse47cE= X-Google-Smtp-Source: AG47ELtwb0aZy4LbIAH7RBLJOtyniIj0CEyt15y7sSQKIA+YERmkC/eLye9PHEpQrrMp0saovl4ptQ== X-Received: by 10.233.232.87 with SMTP id a84mr22755828qkg.197.1519738480690; Tue, 27 Feb 2018 05:34:40 -0800 (PST) In-Reply-To: Xref: news.gmane.org gmane.comp.lib.glibc.alpha:82992 Archived-At: Received: from server1.sourceware.org ([209.132.180.131] helo=sourceware.org) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eqfN4-0008N3-Rz for glibc-alpha@blaine.gmane.org; Tue, 27 Feb 2018 14:32:43 +0100 Received: (qmail 38091 invoked by alias); 27 Feb 2018 13:34:45 -0000 Received: (qmail 38081 invoked by uid 89); 27 Feb 2018 13:34:44 -0000 On 26/02/2018 18:53, Joseph Myers wrote: > Continuing fixes for -Os build issues shown with build-many-glibcs.py, > this patch adds uses of DIAG_* to disable -Wmaybe-uninitialized in two > more places where code inlined from strcoll / wcscoll is wrongly > diagnosed as possibly using uninitialized structure fields. (All > these warnings in different places for these functions are I think > essentially the same bug.) > > Tested with build-many-glibcs.py for alpha-linux-gnu and > mips-linux-gnu that this fixes the -Os build failures for those > configurations with GCC 7. > > 2018-02-26 Joseph Myers > > * locale/weightwc.h (findidx): Ignore -Wmaybe-uninitialized for > -Os in two more places. Reviewed-by: Adhemerval Zanella > > diff --git a/locale/weightwc.h b/locale/weightwc.h > index ac25ba9..36c65b5 100644 > --- a/locale/weightwc.h > +++ b/locale/weightwc.h > @@ -28,7 +28,15 @@ findidx (const int32_t *table, > const wint_t *extra, > const wint_t **cpp, size_t len) > { > + /* With GCC 7 when compiling with -Os the compiler warns that > + seq1.back_us and seq2.back_us, which become *cpp, might be used > + uninitialized. This is impossible as this function cannot be > + called except in cases where those fields have been > + initialized. */ > + DIAG_PUSH_NEEDS_COMMENT; > + DIAG_IGNORE_Os_NEEDS_COMMENT (7, "-Wmaybe-uninitialized"); > wint_t ch = *(*cpp)++; > + DIAG_POP_NEEDS_COMMENT; > int32_t i = __collidx_table_lookup ((const char *) table, ch); > > if (i >= 0) > @@ -107,11 +115,18 @@ findidx (const int32_t *table, > continue; > } > > + /* With GCC 7 when compiling with -Os the compiler warns > + that seq1.back_us and seq2.back_us, which become usrc, > + might be used uninitialized. This is impossible for the > + same reason as described above. */ > + DIAG_PUSH_NEEDS_COMMENT; > + DIAG_IGNORE_Os_NEEDS_COMMENT (7, "-Wmaybe-uninitialized"); > if (cp[nhere - 1] > usrc[nhere -1]) > { > cp += 2 * nhere; > continue; > } > + DIAG_POP_NEEDS_COMMENT; > > if (cp[2 * nhere - 1] < usrc[nhere -1]) > { >