public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/44307]  New: warning: may be used uninitialized in this function often building gcc
@ 2010-05-28 10:43 jay dot krell at cornell dot edu
  2010-05-28 10:45 ` [Bug c/44307] " rguenth at gcc dot gnu dot org
                   ` (7 more replies)
  0 siblings, 8 replies; 10+ messages in thread
From: jay dot krell at cornell dot edu @ 2010-05-28 10:43 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 5940 bytes --]

warning: may be used uninitialized in this function


Including but not necessarily limited to:


ebitmap.c: In function ‘ebitmap_ior_into’:
ebitmap.c:554: warning: ‘i’ may be used uninitialized in this function
ebitmap.c: In function ‘ebitmap_ior’:
ebitmap.c:678: warning: ‘i’ may be used uninitialized in this function
ebitmap.c: In function ‘ebitmap_and_compl’:
ebitmap.c:876: warning: ‘i’ may be used uninitialized in this function
ebitmap.c: In function ‘ebitmap_and_into’:
ebitmap.c:425: warning: ‘i’ may be used uninitialized in this function
ebitmap.c: In function ‘ebitmap_and’:
ebitmap.c:479: warning: ‘i’ may be used uninitialized in this function
ebitmap.c: In function ‘ebitmap_and_compl_into’:
ebitmap.c:796: warning: ‘i’ may be used uninitialized in this function
ira.c:1623: warning: ‘a’ may be used uninitialized in this function
ira.c:1588: warning: ‘a’ may be used uninitialized in this function
ira.c:1656: warning: ‘a’ may be used uninitialized in this function
ira-build.c: In function ‘ira_flattening’:
ira-build.c:2468: warning: ‘a’ may be used uninitialized in this function
ira-build.c:720: warning: ‘a’ may be used uninitialized in this function
ira-build.c:2469: warning: ‘cp’ may be used uninitialized in this function
ira-build.c:347: warning: ‘a’ may be used uninitialized in this function
ira-build.c: In function ‘print_copies’:
ira-build.c:1233: warning: ‘cp’ may be used uninitialized in this function
ira-build.c: In function ‘ira_destroy’:
ira-build.c:1294: warning: ‘cp’ may be used uninitialized in this function
ira-build.c:1008: warning: ‘a’ may be used uninitialized in this function
ira-build.c: In function ‘remove_unnecessary_regions’:
ira-build.c:2007: warning: ‘a’ may be used uninitialized in this function
ira-build.c: In function ‘ira_build’:
ira-build.c:2119: warning: ‘a’ may be used uninitialized in this function
ira-build.c:2358: warning: ‘a’ may be used uninitialized in this function
ira-build.c:2170: warning: ‘a’ may be used uninitialized in this function
ira-build.c:2252: warning: ‘a’ may be used uninitialized in this function
ira-build.c:2797: warning: ‘a’ may be used uninitialized in this function
ira-build.c:2823: warning: ‘a’ may be used uninitialized in this function
ira-costs.c: In function ‘ira_tune_allocno_costs_and_cover_classes’:
ira-costs.c:1728: warning: ‘a’ may be used uninitialized in this function
ira-costs.c: In function ‘find_costs_and_classes’:
ira-costs.c:1181: warning: ‘a’ may be used uninitialized in this function
ira-costs.c:1062: warning: ‘a’ may be used uninitialized in this function
ira-costs.c: In function ‘ira_costs’:
ira-costs.c:1537: warning: ‘a’ may be used uninitialized in this function
ira-conflicts.c: In function ‘build_allocno_conflicts’:
ira-conflicts.c:566: warning: ‘i’ may be used uninitialized in this function
ira-conflicts.c: In function ‘print_conflicts’:
ira-conflicts.c:698: warning: ‘conflict_a’ may be used uninitialized in this
function
ira-conflicts.c:692: warning: ‘a’ may be used uninitialized in this function
ira-conflicts.c: In function ‘ira_build_conflicts’:
ira-conflicts.c:73: warning: ‘allocno’ may be used uninitialized in this
function
ira-conflicts.c:533: warning: ‘cp’ may be used uninitialized in this function
ira-conflicts.c:763: warning: ‘a’ may be used uninitialized in this function
ira-color.c: In function ‘update_conflict_hard_regno_costs’:
ira-color.c:325: warning: ‘divisor’ may be used uninitialized in this function
ira-color.c:330: warning: ‘allocno’ may be used uninitialized in this function
ira-color.c: In function ‘ira_color’:
ira-color.c:3334: warning: ‘a’ may be used uninitialized in this function
ira-color.c:2112: warning: ‘a’ may be used uninitialized in this function
ira-color.c:3265: warning: ‘a’ may be used uninitialized in this function
ira-color.c: In function ‘push_allocno_to_stack’:
ira-color.c:865: warning: ‘conflict_allocno’ may be used uninitialized in this
function
ira-color.c: In function ‘assign_hard_reg’:
ira-color.c:449: warning: ‘conflict_allocno’ may be used uninitialized in this
function
ira-color.c: In function ‘ira_reassign_conflict_allocnos’:
ira-color.c:2281: warning: ‘conflict_a’ may be used uninitialized in this
function
ira-color.c:2281: warning: ‘a’ may be used uninitialized in this function
ira-color.c: In function ‘ira_reassign_pseudos’:
ira-color.c:2867: warning: ‘conflict_a’ may be used uninitialized in this
function
ira-color.c: In function ‘coalesce_allocnos’:
ira-color.c:1554: warning: ‘conflict_allocno’ may be used uninitialized in this
function
ira-color.c: In function ‘ira_sort_regnos_for_alter_reg’:
ira-color.c:2618: warning: ‘a’ may be used uninitialized in this function
ira-color.c: In function ‘color_pass’:
ira-color.c:1397: warning: ‘conflict_allocno’ may be used uninitialized in this
function



In my copy I just put " = { 0 }" after each of these.
  (Ignoring which particular ones needed it and just
  going by variable names alone, ignoring scope.)


I'm using -disable-bootstrap.
But I suspect it doesn't matter in this case (unlike with -Wcast-qual).


Personally, I sprinkle " = { 0 }" liberally my own code.
My code tends to be I/O bound, and many of these will be trivially optimized
away anyway, but granted, not all. I never want to debug an uninitialized local
again, and I don't trust compilers to tell me when they might occur.


-- 
           Summary: warning: may be used uninitialized in this function
                    often building gcc
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jay dot krell at cornell dot edu


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


^ permalink raw reply	[flat|nested] 10+ messages in thread
[parent not found: <bug-44307-4@http.gcc.gnu.org/bugzilla/>]

end of thread, other threads:[~2012-02-03 22:51 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-05-28 10:43 [Bug c/44307] New: warning: may be used uninitialized in this function often building gcc jay dot krell at cornell dot edu
2010-05-28 10:45 ` [Bug c/44307] " rguenth at gcc dot gnu dot org
2010-05-28 10:48 ` jay dot krell at cornell dot edu
2010-05-28 11:36 ` [Bug middle-end/44307] " jsm28 at gcc dot gnu dot org
2010-06-04 15:56 ` manu at gcc dot gnu dot org
2010-06-04 16:21 ` jay dot krell at cornell dot edu
2010-06-04 16:23 ` manu at gcc dot gnu dot org
2010-06-04 16:30 ` jay dot krell at cornell dot edu
2010-06-04 16:37 ` [Bug bootstrap/44307] do not enable warnings when building with the host compiler manu at gcc dot gnu dot org
     [not found] <bug-44307-4@http.gcc.gnu.org/bugzilla/>
2012-02-03 22:51 ` pinskia at gcc dot gnu.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).