From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 44219 invoked by alias); 7 Jun 2017 18:56:31 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 44178 invoked by uid 89); 7 Jun 2017 18:56:30 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=BAYES_00,KAM_LAZY_DOMAIN_SECURITY,SPF_HELO_PASS,T_RP_MATCHES_RCVD autolearn=no version=3.3.2 spammy=tomorrow X-HELO: mx1.redhat.com DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 862B5DC909 Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=fweimer@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 862B5DC909 Subject: Re: [PATCH] Dynamic growable arrays for internal use To: Stefan Liebler , libc-alpha@sourceware.org References: <37f01ed4-1443-8585-42cb-1b7759416ee7@linux.vnet.ibm.com> <5308ddfb-a125-e4f6-8615-3148e350bdd6@redhat.com> <739e4105-e502-1e4e-7494-d7599ddb8b51@linux.vnet.ibm.com> From: Florian Weimer Message-ID: Date: Wed, 07 Jun 2017 18:56:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.0 MIME-Version: 1.0 In-Reply-To: <739e4105-e502-1e4e-7494-d7599ddb8b51@linux.vnet.ibm.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-SW-Source: 2017-06/txt/msg00262.txt.bz2 On 06/07/2017 04:41 PM, Stefan Liebler wrote: > On 06/07/2017 11:40 AM, Florian Weimer wrote: >> On 06/06/2017 05:30 PM, Stefan Liebler wrote: >>> Hi Florian, >>> >>> I get the following warning / werror with gcc 4.8.5 on s390x: >>> gcc tst-dynarray.c -O3 -c ... -o /malloc/tst-dynarray.o >>> In file included from tst-dynarray.c:50:0: >>> tst-dynarray.c: In function ‘do_test’: >>> ../support/check.h:51:8: error: ‘result.length’ may be used >>> uninitialized in this function [-Werror=maybe-uninitialized] >>> if (expr) \ >>> ^ >>> tst-dynarray.c:377:23: note: ‘result.length’ was declared here >>> struct long_array result; >>> ^ >>> In file included from tst-dynarray.c:50:0: >>> ../support/check.h:51:8: error: ‘result.array’ may be used uninitialized >>> in this function [-Werror=maybe-uninitialized] >>> if (expr) \ >>> ^ >>> tst-dynarray.c:377:23: note: ‘result.array’ was declared here >>> struct long_array result; >>> ^ >>> cc1: all warnings being treated as errors >>> >>> >>> Have you seen those warnings on other architectures, too? >> >> I could reproduce it with -O3 on s390x. I have not tried it with other >> architectures, but it is a generic problem with TEST_VERIFY_EXIT which >> is not really related to the dynarray code. I propose the attached >> patch to fix it. >> >> Thanks, >> Florian >> > > This solves the warning with gcc 4.8.5 on s390x. Okay, I'll check it in tomorrow unless there are objections/further comments. Thanks, Florian