From patchwork Thu Sep 16 09:38:46 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Fix --enable-checking=fold bootstrap (PR bootstrap/45686) Date: Wed, 15 Sep 2010 23:38:46 -0000 From: Jakub Jelinek X-Patchwork-Id: 64956 Message-Id: <20100916093846.GQ1269@tyan-ft48-01.lab.bos.redhat.com> To: gcc-patches@gcc.gnu.org Hi! -Wcast-qual complains about (const void **) htab_find_slot () cast, fixed thusly, bootstrapped with --enable-checking=yes,fold - --enable-languages=c on x86-64-linux, committed to trunk as obvious. 2010-09-16 Jakub Jelinek PR bootstrap/45686 * fold-const.c (fold_checksum_tree): Change slot from const void ** to void **, use CONST_CAST_TREE to store into *slot. Jakub --- gcc/fold-const.c.jj 2010-09-09 00:21:04.000000000 +0200 +++ gcc/fold-const.c 2010-09-16 11:05:27.452614712 +0200 @@ -13648,7 +13648,7 @@ fold_check_failed (const_tree expr ATTRI static void fold_checksum_tree (const_tree expr, struct md5_ctx *ctx, htab_t ht) { - const void **slot; + void **slot; enum tree_code code; union tree_node buf; int i, len; @@ -13660,10 +13660,10 @@ recursive_label: && sizeof (struct tree_type) <= sizeof (struct tree_function_decl)); if (expr == NULL) return; - slot = (const void **) htab_find_slot (ht, expr, INSERT); + slot = (void **) htab_find_slot (ht, expr, INSERT); if (*slot != NULL) return; - *slot = expr; + *slot = CONST_CAST_TREE (expr); code = TREE_CODE (expr); if (TREE_CODE_CLASS (code) == tcc_declaration && DECL_ASSEMBLER_NAME_SET_P (expr))