(untitled) · May 6, 2016
Compilers are amazing #1: GCC's built-in strcpy() implementation
0Sign in to vote or save
This page cannot be shown here. You can still read it on the original site — the toolbar below keeps your place in the directory.
This is part 1 of possibly a 1-part series. We’ll see. Has this ever happened to you? You have some code like this: #include <string.h> #include <stdio.h> int main () { char buf [ 32 ] = { 0 }; strcpy ( buf , "Hello world, this is a long string" ); puts ( buf ); } You compile it, run it under a debugger like GDB (or ltrace ?) and set a breakpoint for the call to strcpy() : $ gcc test.c -o test $…
Read on /compilers-amazing-1-gcc-built-in-string-functions-strcpy.html ↗
Comments
Nothing yet. Say the first thing.
Sign in to join the conversation.