diff options
author | Martin Liska <mliska@suse.cz> | 2021-03-15 09:45:41 +0100 |
---|---|---|
committer | Martin Liska <mliska@suse.cz> | 2021-04-21 16:18:05 +0200 |
commit | 8f48ec0946abdc036d74a157623b45fddd864a72 (patch) | |
tree | 3ba6a4b961ca86e58bbdc33d109c11f914095a68 /gcc/tree.c | |
parent | f23881fcf081a6edd538d6d54fa0068d716973d7 (diff) | |
download | gcc-8f48ec0946abdc036d74a157623b45fddd864a72.zip gcc-8f48ec0946abdc036d74a157623b45fddd864a72.tar.gz gcc-8f48ec0946abdc036d74a157623b45fddd864a72.tar.bz2 |
Fix clang warnings.
gcc/ChangeLog:
* config/i386/i386.c: Remove superfluous || TARGET_MACHO
which remains to be '(... || 0)' and clang complains about it.
* dwarf2out.c (AT_vms_delta): Declare conditionally.
(add_AT_vms_delta): Likewise.
* tree.c (fld_simplified_type): Use rather more common pattern
for disabling of something (#if 0).
(get_tree_code_name): Likewise.
(verify_type_variant): Likewise.
Diffstat (limited to 'gcc/tree.c')
-rw-r--r-- | gcc/tree.c | 18 |
1 files changed, 13 insertions, 5 deletions
@@ -5538,9 +5538,11 @@ fld_simplified_type (tree t, class free_lang_data_d *fld) if (POINTER_TYPE_P (t)) return fld_incomplete_type_of (t, fld); /* FIXME: This triggers verification error, see PR88140. */ - if (TREE_CODE (t) == ARRAY_TYPE && 0) +#if 0 + if (TREE_CODE (t) == ARRAY_TYPE) return fld_process_array_type (t, fld_simplified_type (TREE_TYPE (t), fld), fld_simplified_types, fld); +#endif return t; } @@ -13451,7 +13453,7 @@ get_tree_code_name (enum tree_code code) invalid values, so force an unsigned comparison. */ if (unsigned (code) >= MAX_TREE_CODES) { - if (code == 0xa5a5) + if ((unsigned)code == 0xa5a5) return "ggc_freed"; return invalid; } @@ -14099,8 +14101,10 @@ verify_type_variant (const_tree t, tree tv) verify_variant_match (TREE_CODE); /* FIXME: Ada builds non-artificial variants of artificial types. */ - if (TYPE_ARTIFICIAL (tv) && 0) +#if 0 + if (TYPE_ARTIFICIAL (tv)) verify_variant_match (TYPE_ARTIFICIAL); +#endif if (POINTER_TYPE_P (tv)) verify_variant_match (TYPE_REF_CAN_ALIAS_ALL); /* FIXME: TYPE_SIZES_GIMPLIFIED may differs for Ada build. */ @@ -14113,8 +14117,10 @@ verify_type_variant (const_tree t, tree tv) else verify_variant_match (TYPE_SATURATING); /* FIXME: This check trigger during libstdc++ build. */ - if (RECORD_OR_UNION_TYPE_P (t) && COMPLETE_TYPE_P (t) && 0) +#if 0 + if (RECORD_OR_UNION_TYPE_P (t) && COMPLETE_TYPE_P (t)) verify_variant_match (TYPE_FINAL_P); +#endif /* tree_type_common checks. */ @@ -14149,8 +14155,10 @@ verify_type_variant (const_tree t, tree tv) that may differ BY TYPE_CONTEXT that in turn may point to TRANSLATION_UNIT_DECL. Ada also builds variants of types with different TYPE_CONTEXT. */ - if ((!in_lto_p || !TYPE_FILE_SCOPE_P (t)) && 0) +#if 0 + if (!in_lto_p || !TYPE_FILE_SCOPE_P (t)) verify_variant_match (TYPE_CONTEXT); +#endif if (TREE_CODE (t) == ARRAY_TYPE || TREE_CODE (t) == INTEGER_TYPE) verify_variant_match (TYPE_STRING_FLAG); if (TREE_CODE (t) == RECORD_TYPE || TREE_CODE (t) == UNION_TYPE) |