View | Details | Raw Unified | Return to bug 17506 | Differences between
and this patch

Collapse All | Expand All

(-)tree-ssa.c (-2 / +4 lines)
Lines 1352-1357 warn_uninit (tree t, const char *msgid, Link Here
1352
  if (!locus)
1352
  if (!locus)
1353
    locus = &DECL_SOURCE_LOCATION (var);
1353
    locus = &DECL_SOURCE_LOCATION (var);
1354
  warning (msgid, locus, var);
1354
  warning (msgid, locus, var);
1355
  if (locus != &DECL_SOURCE_LOCATION (var))
1356
    note ("%H%qD was declared here", &DECL_SOURCE_LOCATION (var), var);
1355
  TREE_NO_WARNING (var) = 1;
1357
  TREE_NO_WARNING (var) = 1;
1356
}
1358
}
1357
   
1359
   
Lines 1367-1373 warn_uninitialized_var (tree *tp, int *w Link Here
1367
  /* We only do data flow with SSA_NAMEs, so that's all we can warn about.  */
1369
  /* We only do data flow with SSA_NAMEs, so that's all we can warn about.  */
1368
  if (TREE_CODE (t) == SSA_NAME)
1370
  if (TREE_CODE (t) == SSA_NAME)
1369
    {
1371
    {
1370
      warn_uninit (t, "%H'%D' is used uninitialized in this function", locus);
1372
      warn_uninit (t, "%H%qD is used uninitialized in this function", locus);
1371
      *walk_subtrees = 0;
1373
      *walk_subtrees = 0;
1372
    }
1374
    }
1373
  else if (IS_TYPE_OR_DECL_P (t))
1375
  else if (IS_TYPE_OR_DECL_P (t))
Lines 1392-1398 warn_uninitialized_phi (tree phi) Link Here
1392
    {
1394
    {
1393
      tree op = PHI_ARG_DEF (phi, i);
1395
      tree op = PHI_ARG_DEF (phi, i);
1394
      if (TREE_CODE (op) == SSA_NAME)
1396
      if (TREE_CODE (op) == SSA_NAME)
1395
	warn_uninit (op, "%H'%D' may be used uninitialized in this function",
1397
	warn_uninit (op, "%H%qD may be used uninitialized in this function",
1396
		     NULL);
1398
		     NULL);
1397
    }
1399
    }
1398
}
1400
}

Return to bug 17506