[PATCH] Cleanup of input.c

Bernd Edlinger bernd.edlinger@hotmail.de
Mon Sep 26 14:38:00 GMT 2016


Hi,

this started, because I saw get_next_line returns -1 on error, instead
of false: PR 77699.

But when I was there I also saw that read_line_num is using memmove on
non-aliased src & dest, instead of memcpy.  But then I see that
also adding a NUL byte is superfluos, and all the copying as well....


So the result is a cleanup of input.c that avoids lots of copying
altogether, because it is no longer necessary to do so.


Bootstrapped and reg-tested on x86_64-pc-linux-gnu.
Is it OK for trunk?


Thanks
Bernd.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch-input.diff
Type: text/x-patch
Size: 3646 bytes
Desc: patch-input.diff
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20160926/91ff1e90/attachment.bin>


More information about the Gcc-patches mailing list