This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [libibery PATCH] Fix bootstrap
- From: Nathan Sidwell <nathan at acm dot org>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 24 May 2017 20:56:02 -0400
- Subject: Re: [libibery PATCH] Fix bootstrap
- Authentication-results: sourceware.org; auth=none
- References: <e0394ada-24cc-7ad3-1d3a-14db8824dd8f@acm.org>
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. */