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

            Bug ID: 88057
           Summary: libdecnumber/decCommon.c:479: use of out of scope
                    variable
           Product: gcc
           Version: 8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: other
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dcb314 at hotmail dot com
  Target Milestone: ---

trunk/libdecnumber/decCommon.c:479] -> [trunk/libdecnumber/decCommon.c:471] ->
[trunk/libdecnumber/decCommon.c:483]: (error) Using pointer to local variable
'buffer' that is out of scope.

svn blame says

128350      janis         uByte buffer[ROUNDUP(DECPMAX+3, 4)]; /* [+3 allows
uInt padding] */
128350      janis         uByte *s=umsd;                /* source */
128350      janis         uByte *t=buffer;              /* safe target */
128350      janis         uByte *tlsd=buffer+(ulsd-umsd)+shift; /* target LSD
*/
128350      janis         /* printf("folddown shift=%ld\n", (LI)shift); */
145274        bje         for (; s<=ulsd; s+=4, t+=4) UBFROMUI(t, UBTOUI(s));
145274        bje         for (t=tlsd-shift+1; t<=tlsd; t+=4) UBFROMUI(t, 0); 
/* pad 0s */
128350      janis         num->exponent-=shift;
128350      janis         umsd=buffer;
128350      janis         ulsd=tlsd;
128350      janis         }
128350      janis       } /* fold-down? */
128350      janis       length=ulsd-umsd+1;             /* recalculate length
*/

Reply via email to