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

Collapse All | Expand All | Context: (Patch / File /
)

(-)gcc/gcc/tree-ssa.c (-2 / +5 lines)
 Lines 44-49   Boston, MA 02111-1307, USA. */ Link Here 
44
#include "hashtab.h"
44
#include "hashtab.h"
45
#include "tree-dump.h"
45
#include "tree-dump.h"
46
#include "tree-pass.h"
46
#include "tree-pass.h"
47
#include "toplev.h"
47
48
48
49
49
/* Remove edge E and remove the corresponding arguments from the PHI nodes
50
/* Remove edge E and remove the corresponding arguments from the PHI nodes
 Lines 1352-1357   warn_uninit (tree t, const char *msgid, Link Here 
1352
  if (!locus)
1353
  if (!locus)
1353
    locus = &DECL_SOURCE_LOCATION (var);
1354
    locus = &DECL_SOURCE_LOCATION (var);
1354
  warning (msgid, locus, var);
1355
  warning (msgid, locus, var);
1356
  if (locus != &DECL_SOURCE_LOCATION (var))
1357
    inform ("%J%qD was declared here", var, var);
1355
  TREE_NO_WARNING (var) = 1;
1358
  TREE_NO_WARNING (var) = 1;
1356
}
1359
}
1357
   
1360
   
 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.  */
1370
  /* We only do data flow with SSA_NAMEs, so that's all we can warn about.  */
1368
  if (TREE_CODE (t) == SSA_NAME)
1371
  if (TREE_CODE (t) == SSA_NAME)
1369
    {
1372
    {
1370
      warn_uninit (t, "%H'%D' is used uninitialized in this function", locus);
1373
      warn_uninit (t, "%H%qD is used uninitialized in this function", locus);
1371
      *walk_subtrees = 0;
1374
      *walk_subtrees = 0;
1372
    }
1375
    }
1373
  else if (IS_TYPE_OR_DECL_P (t))
1376
  else if (IS_TYPE_OR_DECL_P (t))
 Lines 1392-1398   warn_uninitialized_phi (tree phi) Link Here 
1392
    {
1395
    {
1393
      tree op = PHI_ARG_DEF (phi, i);
1396
      tree op = PHI_ARG_DEF (phi, i);
1394
      if (TREE_CODE (op) == SSA_NAME)
1397
      if (TREE_CODE (op) == SSA_NAME)
1395
	warn_uninit (op, "%H'%D' may be used uninitialized in this function",
1398
	warn_uninit (op, "%H%qD may be used uninitialized in this function",
1396
		     NULL);
1399
		     NULL);
1397
    }
1400
    }
1398
}
1401
}

Return to bug 17506