https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94319

            Bug ID: 94319
           Summary: gcc/cp/coroutines.cc:2654: strange assignment ?
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dcb314 at hotmail dot com
  Target Milestone: ---

>From static analyser cppcheck:

gcc/cp/coroutines.cc:2654:3: warning: Assignment of function parameter
 has no effect outside the function. Did you forget dereferencing it?
[uselessAs
signmentPtrArg]

Source code is

  /* As far as it's necessary, we've walked the subtrees of the call
     expr.  */
  do_subtree = 0;
  return NULL_TREE;
}

Following on from code in the same routine, maybe better code might be

  /* As far as it's necessary, we've walked the subtrees of the call
     expr.  */
  *do_subtree = 0;
  return NULL_TREE;
}

Reply via email to