Fix for GCC PR17040 (GCOV and directory separators on Windows)
Mon Aug 16 09:55:00 GMT 2004
Pascal Obry wrote:
> Here is the ChangeLog entry and the corresponding fix.
> 2004-08-16 Pascal Obry <email@example.com>
> * gcov.c: Properly handle directory separators on DOS based file
> Fixes GCC PR17040
this should be written as
* gcov.c (function): change
I'd suggest first_dir_sep and last_dir_sep rather than l_strchr and l_strrchr.
They also need comments. Do DOS base 'C:' drive names need special treatment?
I'd also find a for loop, with the end-of-string test in the
for () bit, and the IS_DIR_SEPARATOR bit in the loop, easier to understand.
Also could you inline your patch (or mark it as text type), that'd make it
easier to read.
You should also indictate how you tested the patch.
Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery LLC
firstname.lastname@example.org :: http://www.planetfall.pwp.blueyonder.co.uk
More information about the Gcc-patches