On 11/02/2011 08:44 PM, Paolo Carlini wrote:
On 11/02/2011 08:12 PM, Jason Merrill wrote:
Another bootstrap issue:
In file included from /home/jason/src/trunk/gcc/fortran/cpp.c:35:0:
/home/jason/src/trunk/gcc/fortran/../../libcpp/internal.h: In
function ‘unsigned char* ustrchr(const unsigned char*, int)’:
/home/jason/src/trunk/gcc/fortran/../../libcpp/internal.h:782:55:
error: cast from type ‘const char*’ to type ‘unsigned char*’ casts
away qualifiers [-Werror=cast-qual]
Argh, I'll fix it momentarily.
By the way, I have no idea why I didn't see it, only Fortran includes
that header in the *libcpp* directory? Anyway, I'm proceeding to
bootstrap the attached.
Paolo.
/////////////////
Index: internal.h
===================================================================
--- internal.h (revision 180785)
+++ internal.h (working copy)
@@ -770,16 +770,16 @@ ustrlen (const unsigned char *s1)
return strlen ((const char *)s1);
}
-static inline unsigned char *
+static inline const unsigned char *
uxstrdup (const unsigned char *s1)
{
- return (unsigned char *) xstrdup ((const char *)s1);
+ return (const unsigned char *) xstrdup ((const char *)s1);
}
-static inline unsigned char *
+static inline const unsigned char *
ustrchr (const unsigned char *s1, int c)
{
- return (unsigned char *) strchr ((const char *)s1, c);
+ return (const unsigned char *) strchr ((const char *)s1, c);
}
static inline int