This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [libibery PATCH] Fix bootstrap


On 05/24/2017 08:34 PM, Nathan Sidwell wrote:
We now warn on casts to T const.  Applied as obvious to fix bootstrap.

And this fixes c-common.c

nathan

--
Nathan Sidwell
2017-05-24  Nathan Sidwell  <nathan@acm.org>

	* c=common.c (field_decl_cmp, resort_field_decl_cmp): Adjust T
	const casts to avoid warning.

Index: c-common.c
===================================================================
--- c-common.c	(revision 248441)
+++ c-common.c	(working copy)
@@ -5866,8 +5866,8 @@ check_builtin_function_arguments (locati
 int
 field_decl_cmp (const void *x_p, const void *y_p)
 {
-  const tree *const x = (const tree *const) x_p;
-  const tree *const y = (const tree *const) y_p;
+  const tree *const x = (const tree *) x_p;
+  const tree *const y = (const tree *) y_p;
 
   if (DECL_NAME (*x) == DECL_NAME (*y))
     /* A nontype is "greater" than a type.  */
@@ -5892,8 +5892,8 @@ pointer operator in resort_data.  */
 static int
 resort_field_decl_cmp (const void *x_p, const void *y_p)
 {
-  const tree *const x = (const tree *const) x_p;
-  const tree *const y = (const tree *const) y_p;
+  const tree *const x = (const tree *) x_p;
+  const tree *const y = (const tree *) y_p;
 
   if (DECL_NAME (*x) == DECL_NAME (*y))
     /* A nontype is "greater" than a type.  */

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]