public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/18017] New: -Winit-self should automatically turn on -Wuninitialized
@ 2004-10-15 16:49 ejb at ql dot org
  2004-10-15 17:00 ` [Bug c/18017] " pinskia at gcc dot gnu dot org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: ejb at ql dot org @ 2004-10-15 16:49 UTC (permalink / raw)
  To: gcc-bugs

The documentation clearly states that -Winit-self doesn't work without
-Wuninitialized.  I think it would be a lot better if it just automatically
turned on -Wuninitialized instead.  For example, compiling the example in bug
18016 with -Winit-self but not -Wuninitialized doesn't generate any warnings at
all, which is  as expected based on the documentation, but is still somewhat
counter-intuitive.

-- 
           Summary: -Winit-self should automatically turn on -Wuninitialized
           Product: gcc
           Version: 3.4.2
            Status: UNCONFIRMED
          Severity: minor
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: ejb at ql dot org
                CC: ejb at ql dot org,gcc-bugs at gcc dot gnu dot org
 GCC build triplet: any
  GCC host triplet: any
GCC target triplet: any


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


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

* [Bug c/18017] -Winit-self should automatically turn on -Wuninitialized
  2004-10-15 16:49 [Bug c/18017] New: -Winit-self should automatically turn on -Wuninitialized ejb at ql dot org
@ 2004-10-15 17:00 ` pinskia at gcc dot gnu dot org
  2004-10-15 20:34 ` ejb at ql dot org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-15 17:00 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-10-15 17:00 -------
Not going to happen because people use int a = a; as to turn off uninitialize warnings (which is why 
-Winit-self was added in the first place).

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


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


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

* [Bug c/18017] -Winit-self should automatically turn on -Wuninitialized
  2004-10-15 16:49 [Bug c/18017] New: -Winit-self should automatically turn on -Wuninitialized ejb at ql dot org
  2004-10-15 17:00 ` [Bug c/18017] " pinskia at gcc dot gnu dot org
@ 2004-10-15 20:34 ` ejb at ql dot org
  2004-10-15 20:40 ` ejb at ql dot org
  2004-10-15 20:46 ` pinskia at gcc dot gnu dot org
  3 siblings, 0 replies; 5+ messages in thread
From: ejb at ql dot org @ 2004-10-15 20:34 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From ejb at ql dot org  2004-10-15 20:34 -------
I think you misunderstood.  I'm not suggesting -Wunitialized should turn on
-Winit-self; I'm suggesting the other way around.  Since -Winit-self doesn't
work without -Wunitialized, it's pointless to have it without -Wunitialized. 
-Wunitialized by itself should do what it does.  -Winit-self by itself should do
what -Winit-self -Wunitialized does now.  I hope that clarifies my request. :-)

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


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


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

* [Bug c/18017] -Winit-self should automatically turn on -Wuninitialized
  2004-10-15 16:49 [Bug c/18017] New: -Winit-self should automatically turn on -Wuninitialized ejb at ql dot org
  2004-10-15 17:00 ` [Bug c/18017] " pinskia at gcc dot gnu dot org
  2004-10-15 20:34 ` ejb at ql dot org
@ 2004-10-15 20:40 ` ejb at ql dot org
  2004-10-15 20:46 ` pinskia at gcc dot gnu dot org
  3 siblings, 0 replies; 5+ messages in thread
From: ejb at ql dot org @ 2004-10-15 20:40 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From ejb at ql dot org  2004-10-15 20:40 -------
In other words, instead of saying:

Note this option can only be used with the`-Wuninitialized' option, which in
turn only works with `-O1' and above.

say

Note this option automatically implies -Wunitialized, which only works with
`-O1' and above.

-- 


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


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

* [Bug c/18017] -Winit-self should automatically turn on -Wuninitialized
  2004-10-15 16:49 [Bug c/18017] New: -Winit-self should automatically turn on -Wuninitialized ejb at ql dot org
                   ` (2 preceding siblings ...)
  2004-10-15 20:40 ` ejb at ql dot org
@ 2004-10-15 20:46 ` pinskia at gcc dot gnu dot org
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-15 20:46 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-10-15 20:46 -------
Ok, now I understand (I was really busy this morning not to understand).
Confirmed, I will try to get this done for 4.1.0.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |pinskia at gcc dot gnu dot
                   |dot org                     |org
             Status|UNCONFIRMED                 |ASSIGNED
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2004-10-15 20:46:11
               date|                            |


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


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

end of thread, other threads:[~2004-10-15 20:46 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-15 16:49 [Bug c/18017] New: -Winit-self should automatically turn on -Wuninitialized ejb at ql dot org
2004-10-15 17:00 ` [Bug c/18017] " pinskia at gcc dot gnu dot org
2004-10-15 20:34 ` ejb at ql dot org
2004-10-15 20:40 ` ejb at ql dot org
2004-10-15 20:46 ` 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).