+2008-07-16 Olivier Hainque <hainque@adacore.com>
+
+ * collect2.c (scan_prog_file, COFF version): Use CONST_CAST
+ instead of bare conversion to cast const-ness away.
+
2008-07-16 Anatoly Sokolov <aesok@post.ru>
* config/xtensa/xtensa.h (FUNCTION_OUTGOING_VALUE,
/* Some platforms (e.g. OSF4) declare ldopen as taking a
non-const char * filename parameter, even though it will not
modify that string. So we must cast away const-ness here,
- which will cause -Wcast-qual to burp. */
- if ((ldptr = ldopen ((char *)prog_name, ldptr)) != NULL)
+ using CONST_CAST to prevent complaints from -Wcast-qual. */
+ if ((ldptr = ldopen (CONST_CAST (char *, prog_name), ldptr)) != NULL)
{
if (! MY_ISCOFF (HEADER (ldptr).f_magic))
fatal ("%s: not a COFF file", prog_name);