[Bug c++/95948] New: memmove error

Khram at mail dot ru gcc-bugzilla@gcc.gnu.org
Sun Jun 28 15:01:52 GMT 2020


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

            Bug ID: 95948
           Summary: memmove error
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: Khram at mail dot ru
  Target Milestone: ---

Memmove has a mistake. Need like this:

char* memmove( char *A, char *B, int L )    //! странности из GCC-10.1
{ char *res=A; if( A>B )while( L-->0 )*A++=*B++; else
                 { A+=L; B+=L; while( L-->0 )*--A=*--B; } return res;
}


More information about the Gcc-bugs mailing list