public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/12153] New: uninitialized use not spotted in "T x = x;"
@ 2003-09-03 13:50 simon dot marshall at misys dot com
  2003-09-03 14:12 ` [Bug c/12153] " bangerth at dealii dot org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: simon dot marshall at misys dot com @ 2003-09-03 13:50 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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

           Summary: uninitialized use not spotted in "T x = x;"
           Product: gcc
           Version: 3.3.1
            Status: UNCONFIRMED
          Severity: minor
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: simon dot marshall at misys dot com
                CC: gcc-bugs at gcc dot gnu dot org

With the program:

#include <stdio.h>
int main ()
{
    int x = x;
    printf ("x=%d\n", x);
    return 0;
}

gcc -O -W -Wall does not report the use of x before initialisation (as it would 
at the printf() if it had been "int x;").

Obscure I know, but we had a C++ code typo of this form which gcc should have 
spotted.


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

* [Bug c/12153] uninitialized use not spotted in "T x = x;"
  2003-09-03 13:50 [Bug c/12153] New: uninitialized use not spotted in "T x = x;" simon dot marshall at misys dot com
@ 2003-09-03 14:12 ` bangerth at dealii dot org
  2003-10-16 21:47 ` pinskia at gcc dot gnu dot org
  2003-10-16 21:47 ` pinskia at gcc dot gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: bangerth at dealii dot org @ 2003-09-03 14:12 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


bangerth at dealii dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |3.4


------- Additional Comments From bangerth at dealii dot org  2003-09-03 14:12 -------
This is already fixed in mainline, which gives 
  tmp/g> ../build-gcc/gcc-install/bin/gcc -Winit-self -c x.c -O -W -Wall 
  x.c: In function `main': 
  x.c:4: warning: 'x' might be used uninitialized in this function 
 
W.


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

* [Bug c/12153] uninitialized use not spotted in "T x = x;"
  2003-09-03 13:50 [Bug c/12153] New: uninitialized use not spotted in "T x = x;" simon dot marshall at misys dot com
  2003-09-03 14:12 ` [Bug c/12153] " bangerth at dealii dot org
  2003-10-16 21:47 ` pinskia at gcc dot gnu dot org
@ 2003-10-16 21:47 ` pinskia at gcc dot gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-10-16 21:47 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |DUPLICATE


------- Additional Comments From pinskia at gcc dot gnu dot org  2003-10-16 21:47 -------
bug 5582 which I fixed.

*** This bug has been marked as a duplicate of 5582 ***


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

* [Bug c/12153] uninitialized use not spotted in "T x = x;"
  2003-09-03 13:50 [Bug c/12153] New: uninitialized use not spotted in "T x = x;" simon dot marshall at misys dot com
  2003-09-03 14:12 ` [Bug c/12153] " bangerth at dealii dot org
@ 2003-10-16 21:47 ` pinskia at gcc dot gnu dot org
  2003-10-16 21:47 ` pinskia at gcc dot gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-10-16 21:47 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |UNCONFIRMED
         Resolution|FIXED                       |


------- Additional Comments From pinskia at gcc dot gnu dot org  2003-10-16 21:47 -------
Reopening bug to mark as a dup of ...


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

end of thread, other threads:[~2003-10-16 21:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-09-03 13:50 [Bug c/12153] New: uninitialized use not spotted in "T x = x;" simon dot marshall at misys dot com
2003-09-03 14:12 ` [Bug c/12153] " bangerth at dealii dot org
2003-10-16 21:47 ` pinskia at gcc dot gnu dot org
2003-10-16 21:47 ` pinskia at gcc dot gnu dot org

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).