On Sat, Oct 13, 2012 at 8:51 AM, Andreas Schwab <sch...@linux-m68k.org> wrote: > PR gcov-profile/44728 > * gcov.c (create_file_names): When stripping extension only look > at base name.
> diff --git a/gcc/gcov.c b/gcc/gcov.c > index cf26ce1..09831c2 100644 > --- a/gcc/gcov.c > +++ b/gcc/gcov.c > @@ -842,7 +842,7 @@ create_file_names (const char *file_name) > } > > /* Remove the extension. */ > - cptr = strrchr (name, '.'); > + cptr = strrchr (CONST_CAST (char *, lbasename (name)), '.'); > if (cptr) > *cptr = 0; Why do you need the CONST_CAST? strrchr is a standard function and it takes const char * as the first argument. There is other code in gcc that calls strrchr with a const char * argument. This patch is OK without the CONST_CAST. Thanks. Ian