public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/56705] New: 4.8-20130319 misdiagnoses initialized var (regression from 4.7.2)
@ 2013-03-24  7:29 eggert at gnu dot org
  2013-03-24  8:15 ` [Bug middle-end/56705] " pinskia at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: eggert at gnu dot org @ 2013-03-24  7:29 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56705

             Bug #: 56705
           Summary: 4.8-20130319 misdiagnoses initialized var (regression
                    from 4.7.2)
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: eggert@gnu.org


Created attachment 29711
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29711
test program, abstracted from Emacs source code

This is GCC 4.8-20130319, x86-64, compiled on Fedora 17.
I ran into this problem when building a test version of Emacs.
Compiling the attached program with:

gcc -std=gnu99 -S -Wall -Werror -O3 t.i

yields the following diagnostic.

t.i: In function 'egetenv':
t.i:195:9: error: 'value' may be used uninitialized in this function
[-Werror=maybe-uninitialized]
   char *value;
         ^

The diagnostic appears to be incorrect, as
there's no path through egetenv where 'value'
may be unused.

The diagnostic is not generated by GCC 4.7.2.

Removing the seemingly-unrelated function Fgetenv_internal
makes the diagnostic go away.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-11-20  0:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-24  7:29 [Bug c/56705] New: 4.8-20130319 misdiagnoses initialized var (regression from 4.7.2) eggert at gnu dot org
2013-03-24  8:15 ` [Bug middle-end/56705] " pinskia at gcc dot gnu.org
2013-03-25 10:21 ` rguenth at gcc dot gnu.org
2013-11-20  0:37 ` law at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).