In function 'void print()',
    inlined from 'void topological_sort(int, int)' at /in/foo.cc:66:8:
/in/foo.cc:51:9: warning: 'void* memcpy(void*, const void*, size_t)' writing 400005 bytes into a region of size 400004 overflows the destination [-Wstringop-overflow=]
   memcpy(num,num2,sizeof(num)+1);
   ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
In function 'void print()',
    inlined from 'void topological_sort(int, int)' at /in/foo.cc:66:8,
    inlined from 'void topological_sort(int, int)' at /in/foo.cc:73:20:
/in/foo.cc:51:9: warning: 'void* memcpy(void*, const void*, size_t)' writing 400005 bytes into a region of size 400004 overflows the destination [-Wstringop-overflow=]
   memcpy(num,num2,sizeof(num)+1);
   ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
In function 'void print()',
    inlined from 'void topological_sort(int, int)' at /in/foo.cc:66:8,
    inlined from 'int main()' at /in/foo.cc:92:20:
/in/foo.cc:51:9: warning: 'void* memcpy(void*, const void*, size_t)' writing 400005 bytes into a region of size 400004 overflows the destination [-Wstringop-overflow=]
   memcpy(num,num2,sizeof(num)+1);
   ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
In function 'void print()',
    inlined from 'void topological_sort(int, int)' at /in/foo.cc:66:8,
    inlined from 'void topological_sort(int, int)' at /in/foo.cc:73:20,
    inlined from 'int main()' at /in/foo.cc:92:20:
/in/foo.cc:51:9: warning: 'void* memcpy(void*, const void*, size_t)' writing 400005 bytes into a region of size 400004 overflows the destination [-Wstringop-overflow=]
   memcpy(num,num2,sizeof(num)+1);
   ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
In function 'void print()',
    inlined from 'void topological_sort(int, int)' at /in/foo.cc:66:8,
    inlined from 'void topological_sort(int, int)' at /in/foo.cc:73:20,
    inlined from 'void topological_sort(int, int)' at /in/foo.cc:73:20,
    inlined from 'int main()' at /in/foo.cc:92:20:
/in/foo.cc:51:9: warning: 'void* memcpy(void*, const void*, size_t)' writing 400005 bytes into a region of size 400004 overflows the destination [-Wstringop-overflow=]
   memcpy(num,num2,sizeof(num)+1);
   ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
In function 'void print()',
    inlined from 'void topological_sort(int, int)' at /in/foo.cc:66:8,
    inlined from 'void topological_sort(int, int)' at /in/foo.cc:73:20,
    inlined from 'void topological_sort(int, int)' at /in/foo.cc:73:20,
    inlined from 'void topological_sort(int, int)' at /in/foo.cc:73:20,
    inlined from 'int main()' at /in/foo.cc:92:20:
/in/foo.cc:51:9: warning: 'void* memcpy(void*, const void*, size_t)' writing 400005 bytes into a region of size 400004 overflows the destination [-Wstringop-overflow=]
   memcpy(num,num2,sizeof(num)+1);
   ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~