OSDN Git Service

PR c++/15815
[pf3gnuchains/gcc-fork.git] / gcc / tree-nrv.c
index 2c34496..761bb03 100644 (file)
@@ -54,7 +54,7 @@ struct nrv_data
      this function's RETURN_EXPR statements.  */
   tree var;
 
-  /* This is the function's RESULT_DECL.  We will replace all occurences
+  /* This is the function's RESULT_DECL.  We will replace all occurrences
      of VAR with RESULT_DECL when we apply this optimization.  */
   tree result;
 };
@@ -80,11 +80,12 @@ finalize_nrv_r (tree *tp, int *walk_subtrees, void *data)
   /* No need to walk into types.  */
   if (TYPE_P (*tp))
     *walk_subtrees = 0;
-  /* If this is a RETURN_EXPR, then set the expression being returned
-     to RESULT.  */
+
+  /* If this is a RETURN_EXPR, set the expression being returned to RESULT.  */
   else if (TREE_CODE (*tp) == RETURN_EXPR)
     TREE_OPERAND (*tp, 0) = dp->result;
-  /* Replace all occurences of VAR with RESULT.  */
+
+  /* Otherwise replace all occurrences of VAR with RESULT.  */
   else if (*tp == dp->var)
     *tp = dp->result;