From unknown Tue Jun 17 20:15:29 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#23894 <23894@debbugs.gnu.org> To: bug#23894 <23894@debbugs.gnu.org> Subject: Status: compilation fails with `-Og' Reply-To: bug#23894 <23894@debbugs.gnu.org> Date: Wed, 18 Jun 2025 03:15:29 +0000 retitle 23894 compilation fails with `-Og' reassign 23894 gzip submitter 23894 Gon=C3=A7alo Ribeiro severity 23894 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 04 12:16:58 2016 Received: (at submit) by debbugs.gnu.org; 4 Jul 2016 16:16:59 +0000 Received: from localhost ([127.0.0.1]:37278 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bK6YM-0002Hv-KE for submit@debbugs.gnu.org; Mon, 04 Jul 2016 12:16:58 -0400 Received: from eggs.gnu.org ([208.118.235.92]:35123) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bK4x2-0008Ew-9S for submit@debbugs.gnu.org; Mon, 04 Jul 2016 10:34:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bK4ww-0000zd-4u for submit@debbugs.gnu.org; Mon, 04 Jul 2016 10:34:15 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: * X-Spam-Status: No, score=1.3 required=5.0 tests=BAYES_50, FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,FREEMAIL_REPLYTO_END_DIGIT, HTML_MESSAGE,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:53135) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bK4ww-0000z7-1J for submit@debbugs.gnu.org; Mon, 04 Jul 2016 10:34:14 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54299) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bK4wt-0007Zu-Tf for bug-gzip@gnu.org; Mon, 04 Jul 2016 10:34:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bK4wn-0000ti-Tb for bug-gzip@gnu.org; Mon, 04 Jul 2016 10:34:10 -0400 Received: from nm26-vm7.bullet.mail.ir2.yahoo.com ([212.82.97.49]:52537) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bK4wn-0000sq-H9 for bug-gzip@gnu.org; Mon, 04 Jul 2016 10:34:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.co.uk; s=s2048; t=1467642843; bh=jkJgJ5trpzZj14uTtUv5fkoCphqiIp/jhfObTveSP28=; h=Date:From:Reply-To:To:Subject:References:From:Subject; b=T7IZVvfJMgsDfThkVB8Bxu3Z/Qow2pTXg79stR2kdqDUgNIlYddfRfBQRThQrJNZJy6kyqtYy+mJ9oE8y0+tQpQ58ot+84sJpMyrbfYSJshGlKawjp9oKfQv1mUAWxaYJZjn03MeG9NnKKe4Yxw9gCtSDfBC79AeYmBZWXmLoD4DUcsYeOgyum7nmMlT65jR3qosx6um1Ayy6AgmpAPlaLlGh1KkkoD3huB1yI2YYJYNfdD4Vjc3soSW9OxAsnHAS+3fLGaNHH3NUvN2DYgLqxNjPuRILFcHp9b4d4219XbrDDQz/pyTpkQsm+V77SYUcFMcIt5Rncio4lVU+SNA2Q== Received: from [212.82.98.52] by nm26.bullet.mail.ir2.yahoo.com with NNFMP; 04 Jul 2016 14:34:03 -0000 Received: from [212.82.98.86] by tm5.bullet.mail.ir2.yahoo.com with NNFMP; 04 Jul 2016 14:34:03 -0000 Received: from [127.0.0.1] by omp1023.mail.ir2.yahoo.com with NNFMP; 04 Jul 2016 14:34:03 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 512032.15466.bm@omp1023.mail.ir2.yahoo.com X-YMail-OSG: HohColwVM1mF0aYKL1Rdb7laIMRUq.dLaSgMHMAQJAzIDkMbM9YDR2._92FeGzd 8LYr45dxPX31EPafKsBIq.ZWddVWNTL0rSF_NNvOzmAx_bV7DH6LJft6rW76fV6LCwIyR7p_vrJ_ xemDCwoEXsdNXujZurymPptvflJvR3lnrCJCFmSyLfELQn8Q_6U9hmeYgI1mjWQKaqca5l2VF6hu N.KJSdQXCPWvVobMqQ9S3zZ3jn2fkpAqjqopeC_y48_HsgGMJlRqCB9AFRh9mJUJ7LQdgUsxDnoj MLKLCPcGbW_slr2yQkuU.Z6Hl7bT2wLbFV5MTrwtKgwbXwqV5loAPtrNPWhWWIsFTwFJNGujvhiT MiEWU9HgiM236HjuoH1tp8Pe4d9FP1GtXmNZR5lYce.RdbNIYXxob27RDc50FY4l3O5B3COYZ8Wu w7TwuSU9dCAlm9dVlFYFatFSGNbvWF54l05FVZq_V6iVtVYmYScaIJgfVVQ3SLREfXd4rgll5G0c hxgV5smSw1c3p8mpqmO.AQCfw5N7RQw-- Received: from jws11129.mail.ir2.yahoo.com by sendmailws108.mail.ir2.yahoo.com; Mon, 04 Jul 2016 14:34:03 +0000; 1467642843.002 Date: Mon, 4 Jul 2016 14:32:56 +0000 (UTC) From: =?UTF-8?Q?Gon=C3=A7alo_Ribeiro?= To: "bug-gzip@gnu.org" Message-ID: <1046948204.2667738.1467642776827.JavaMail.yahoo@mail.yahoo.com> Subject: compilation fails with `-Og' MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_2667737_849446337.1467642776823" References: <1046948204.2667738.1467642776827.JavaMail.yahoo.ref@mail.yahoo.com> Content-Length: 2732 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -3.9 (---) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Mon, 04 Jul 2016 12:16:57 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: =?UTF-8?Q?Gon=C3=A7alo_Ribeiro?= Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.9 (---) ------=_Part_2667737_849446337.1467642776823 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hello, Today I tried compiling gzip with `CFLAGS =3D -ggdb3 -Og', which resulted i= n the following error=C2=A0 gzip.c: In function 'main':gzip.c:609:19: error: 'optc' may be used uniniti= alized in this function [-Werror=3Dmaybe-uninitialized]=C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0fprintf (stderr, "-%c: ", = optc - ENV_OPTION); After messing around a bit I found that the problem is with the `-Og' flag.= With the default `-O2' the compilation is sucessful. As expected, by initialising the 'optc' variable the error goes away. I'm j= ust not sure if any value is good for the initialisation. Regards,Gon=C3=A7alo Ribeiro ------=_Part_2667737_849446337.1467642776823 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hello,

Today I tried compiling gzip = with `CFLAGS =3D -ggdb3 -Og', which resulted in the following error 

gzip.c: In function 'main':
gzip.c:609:19: error: 'optc' ma= y be used uninitialized in this function [-Werror=3Dmaybe-uninitialized]
  &nbs= p;                fprintf (stderr, = "-%c: ", optc - ENV_OPTION);

After messing around a bit I found that the problem is with= the `-Og' flag. With the default `-O2' the compilation is sucessful.
=

As expected, by in= itialising the 'optc' variable the error goes away. I'm just not sure if an= y value is good for the initialisation.

Regards,
Gon=C3=A7alo Ribeiro
------=_Part_2667737_849446337.1467642776823-- From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 05 10:06:35 2016 Received: (at 23894-done) by debbugs.gnu.org; 5 Jul 2016 14:06:35 +0000 Received: from localhost ([127.0.0.1]:38340 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bKQzj-0003Hg-5Z for submit@debbugs.gnu.org; Tue, 05 Jul 2016 10:06:35 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:50609) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bKQzg-0003HT-OG for 23894-done@debbugs.gnu.org; Tue, 05 Jul 2016 10:06:33 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id D1E2B161460; Tue, 5 Jul 2016 07:06:26 -0700 (PDT) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id QD0_DT4X7xqg; Tue, 5 Jul 2016 07:06:21 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 56F9A161479; Tue, 5 Jul 2016 07:06:21 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id rRuKp9YPzFmS; Tue, 5 Jul 2016 07:06:21 -0700 (PDT) Received: from [192.168.0.35] (89-159-79-138.rev.numericable.fr [89.159.79.138]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id A47A1161460; Tue, 5 Jul 2016 07:06:20 -0700 (PDT) Subject: Re: bug#23894: compilation fails with `-Og' To: =?UTF-8?Q?Gon=c3=a7alo_Ribeiro?= , 23894-done@debbugs.gnu.org References: <1046948204.2667738.1467642776827.JavaMail.yahoo.ref@mail.yahoo.com> <1046948204.2667738.1467642776827.JavaMail.yahoo@mail.yahoo.com> From: Paul Eggert Message-ID: <577BBED7.9010609@cs.ucla.edu> Date: Tue, 5 Jul 2016 16:06:15 +0200 User-Agent: Mozilla/5.0 (X11; Linux i686; rv:38.0) Gecko/20100101 Thunderbird/38.8.0 MIME-Version: 1.0 In-Reply-To: <1046948204.2667738.1467642776827.JavaMail.yahoo@mail.yahoo.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: 23894-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.3 (-) On 07/04/2016 04:32 PM, Gon=C3=A7alo Ribeiro wrote: > As expected, by initialising the 'optc' variable the error goes away. The optc variable is always initialized anyway, so there should be no=20 need to add extra initialization for it. The problem is that your=20 compiler is issuing a false alarm in some cases. Since this is merely a=20 warning and the warning is incorrect, I wouldn't worry about it. From unknown Tue Jun 17 20:15:29 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 03 Aug 2016 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator