emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[debbugs-tracker] bug#23894: closed (compilation fails with `-Og')


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#23894: closed (compilation fails with `-Og')
Date: Tue, 05 Jul 2016 14:07:02 +0000

Your message dated Tue, 5 Jul 2016 16:06:15 +0200
with message-id <address@hidden>
and subject line Re: bug#23894: compilation fails with `-Og'
has caused the debbugs.gnu.org bug report #23894,
regarding compilation fails with `-Og'
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
23894: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=23894
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: compilation fails with `-Og' Date: Mon, 4 Jul 2016 14:32:56 +0000 (UTC)
Hello,

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

gzip.c: In function 'main':
gzip.c:609:19: error: 'optc' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                   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 initialising the 'optc' variable the error goes away. I'm just not sure if any value is good for the initialisation.

Regards,
Gonçalo Ribeiro

--- End Message ---
--- Begin Message --- Subject: Re: bug#23894: compilation fails with `-Og' 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
On 07/04/2016 04:32 PM, Gonçalo 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 need to add extra initialization for it. The problem is that your compiler is issuing a false alarm in some cases. Since this is merely a warning and the warning is incorrect, I wouldn't worry about it.


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]