GNU bug report logs -
#24424
Emacs fails to build with --enable-gcc-warnings on gcc 4.8.4
Previous Next
Reported by: Michal Nazarewicz <mpn <at> google.com>
Date: Mon, 12 Sep 2016 20:56:01 UTC
Severity: minor
Tags: notabug, wontfix
Done: Glenn Morris <rgm <at> gnu.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 24424 in the body.
You can then email your comments to 24424 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#24424
; Package
emacs
.
(Mon, 12 Sep 2016 20:56:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Michal Nazarewicz <mpn <at> google.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Mon, 12 Sep 2016 20:56:01 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Building with --enable-gcc-warnings results in:
CC bidi.o
bidi.c: In function ‘bidi_find_bracket_pairs’:
bidi.c:2765:38: error: ‘pairing_pos’ may be used uninitialized in this
function [-Werror=maybe-uninitialized]
bidi_it->next_for_neutral.charpos = pairing_pos;
^
cc1: all warnings being treated as errors
$ gcc --version
gcc (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4
Cursory look at the function did not reveal obvious solution.
--
Best regards
ミハウ “𝓶𝓲𝓷𝓪86” ナザレヴイツ
«If at first you don’t succeed, give up skydiving»
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#24424
; Package
emacs
.
(Tue, 13 Sep 2016 14:28:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 24424 <at> debbugs.gnu.org (full text, mbox):
tags 24424 + notabug
thanks
> From: Michal Nazarewicz <mpn <at> google.com>
> Date: Mon, 12 Sep 2016 22:54:11 +0200
>
> Building with --enable-gcc-warnings results in:
>
> CC bidi.o
> bidi.c: In function ‘bidi_find_bracket_pairs’:
> bidi.c:2765:38: error: ‘pairing_pos’ may be used uninitialized in this
> function [-Werror=maybe-uninitialized]
> bidi_it->next_for_neutral.charpos = pairing_pos;
> ^
> cc1: all warnings being treated as errors
>
> $ gcc --version
> gcc (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4
>
> Cursory look at the function did not reveal obvious solution.
I don't see this warning on my system, with GCC 5.3. I suggest to
upgrade your GCC version, or omit this switch from the command line.
Paul will correct me if I'm wrong, but IME these paranoid warning
switches are only usable with GCC 5 (or maybe 4.9) and later, and
yield too many false positives with earlier versions.
There's nothing wrong with the code in that function. Its 'while (1)'
loop can only be exited via one of the 2 'break' statements. The
former of these two exits assigns 'true' to 'retval', the 2nd gives a
value to 'pairing_pos':
if (type == NEUTRAL_B
|| (bidi_it->level_stack[bidi_it->stack_idx].level
!= current_level))
{
/* We've marched all the way to the end of this
isolating run sequence, and didn't find matching
closing brackets for some opening brackets. Leave
their type unchanged. */
pairing_pos = bidi_it->charpos;
break;
}
In the former case, 'pairing_pos' gets its value after the loop:
if (retval)
pairing_pos = bidi_it->bracket_pairing_pos;
(The 'while (1)' loop can also be exited via 'goto give_up', but in
that case the value of 'pairing_pos' is not used at all.)
Added tag(s) notabug.
Request was from
Eli Zaretskii <eliz <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Tue, 13 Sep 2016 14:28:02 GMT)
Full text and
rfc822 format available.
Added tag(s) wontfix.
Request was from
Glenn Morris <rgm <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Thu, 15 Sep 2016 15:49:02 GMT)
Full text and
rfc822 format available.
bug closed, send any further explanations to
24424 <at> debbugs.gnu.org and Michal Nazarewicz <mpn <at> google.com>
Request was from
Glenn Morris <rgm <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Thu, 15 Sep 2016 15:49:02 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Fri, 14 Oct 2016 11:24:03 GMT)
Full text and
rfc822 format available.
This bug report was last modified 8 years and 252 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.