diff --git a/gcc/attribs.cc b/gcc/attribs.cc index 9fb564bd55dd9acbf50b8c44c1e72fcb86eafb48..0be7b83b26427b5130bcf7b1f7f9241f75adef2c 100644 --- a/gcc/attribs.cc +++ b/gcc/attribs.cc @@ -381,7 +381,7 @@ lookup_scoped_attribute_spec (const_tree ns, const_tree name) struct substring attr; scoped_attributes *attrs; - const char *ns_str = (ns != NULL_TREE) ? IDENTIFIER_POINTER (ns): NULL; + const char *ns_str = (ns != NULL_TREE) ? IDENTIFIER_POINTER (ns) : NULL; attrs = find_attribute_namespace (ns_str); diff --git a/gcc/basic-block.h b/gcc/basic-block.h index 5d3e629229e35afec465526e0c65282959092133..ba68660ebeefb11ec8faf4bd93fd42be445a0762 100644 --- a/gcc/basic-block.h +++ b/gcc/basic-block.h @@ -224,7 +224,7 @@ enum cfg_bb_flags /* For iterating over insns in basic block when we might remove the current insn. */ #define FOR_BB_INSNS_SAFE(BB, INSN, CURR) \ - for ((INSN) = BB_HEAD (BB), (CURR) = (INSN) ? NEXT_INSN ((INSN)): NULL; \ + for ((INSN) = BB_HEAD (BB), (CURR) = (INSN) ? NEXT_INSN ((INSN)) : NULL; \ (INSN) && (INSN) != NEXT_INSN (BB_END (BB)); \ (INSN) = (CURR), (CURR) = (INSN) ? NEXT_INSN ((INSN)) : NULL) diff --git a/gcc/c-family/c-opts.cc b/gcc/c-family/c-opts.cc index 510e0870140e4965260368c9683bc813f73327b2..21ed7c73d89a061752c72163456cb3a2efe2393a 100644 --- a/gcc/c-family/c-opts.cc +++ b/gcc/c-family/c-opts.cc @@ -242,7 +242,7 @@ c_common_init_options (unsigned int decoded_options_count, g_string_concat_db = new (ggc_alloc <string_concat_db> ()) string_concat_db (); - parse_in = cpp_create_reader (c_dialect_cxx () ? CLK_GNUCXX: CLK_GNUC89, + parse_in = cpp_create_reader (c_dialect_cxx () ? CLK_GNUCXX : CLK_GNUC89, ident_hash, line_table, ident_hash_extra); cb = cpp_get_callbacks (parse_in); cb->diagnostic = c_cpp_diagnostic; @@ -358,13 +358,13 @@ c_common_handle_option (size_t scode, const char *arg, HOST_WIDE_INT value, preprocessed output, but still do -dM etc. as software depends on this. Preprocessed output does occur if -MD, -MMD or environment var dependency generation is used. */ - cpp_opts->deps.style = (code == OPT_M ? DEPS_SYSTEM: DEPS_USER); + cpp_opts->deps.style = (code == OPT_M ? DEPS_SYSTEM : DEPS_USER); flag_no_output = 1; break; case OPT_MD: case OPT_MMD: - cpp_opts->deps.style = (code == OPT_MD ? DEPS_SYSTEM: DEPS_USER); + cpp_opts->deps.style = (code == OPT_MD ? DEPS_SYSTEM : DEPS_USER); cpp_opts->deps.need_preprocessor_output = true; deps_file = arg; break; @@ -1389,7 +1389,7 @@ c_common_finish (void) deps_stream = stdout; else { - deps_stream = fopen (deps_file, deps_append ? "a": "w"); + deps_stream = fopen (deps_file, deps_append ? "a" : "w"); if (!deps_stream) fatal_error (input_location, "opening dependency file %s: %m", deps_file); @@ -1811,7 +1811,7 @@ cb_dir_change (cpp_reader * ARG_UNUSED (pfile), const char *dir) static void set_std_c89 (int c94, int iso) { - cpp_set_lang (parse_in, c94 ? CLK_STDC94: iso ? CLK_STDC89: CLK_GNUC89); + cpp_set_lang (parse_in, c94 ? CLK_STDC94 : iso ? CLK_STDC89 : CLK_GNUC89); flag_iso = iso; flag_no_asm = iso; flag_no_gnu_keywords = iso; @@ -1828,7 +1828,7 @@ set_std_c89 (int c94, int iso) static void set_std_c99 (int iso) { - cpp_set_lang (parse_in, iso ? CLK_STDC99: CLK_GNUC99); + cpp_set_lang (parse_in, iso ? CLK_STDC99 : CLK_GNUC99); flag_no_asm = iso; flag_no_nonansi_builtin = iso; flag_iso = iso; @@ -1844,7 +1844,7 @@ set_std_c99 (int iso) static void set_std_c11 (int iso) { - cpp_set_lang (parse_in, iso ? CLK_STDC11: CLK_GNUC11); + cpp_set_lang (parse_in, iso ? CLK_STDC11 : CLK_GNUC11); flag_no_asm = iso; flag_no_nonansi_builtin = iso; flag_iso = iso; @@ -1860,7 +1860,7 @@ set_std_c11 (int iso) static void set_std_c17 (int iso) { - cpp_set_lang (parse_in, iso ? CLK_STDC17: CLK_GNUC17); + cpp_set_lang (parse_in, iso ? CLK_STDC17 : CLK_GNUC17); flag_no_asm = iso; flag_no_nonansi_builtin = iso; flag_iso = iso; @@ -1876,7 +1876,7 @@ set_std_c17 (int iso) static void set_std_c23 (int iso) { - cpp_set_lang (parse_in, iso ? CLK_STDC23: CLK_GNUC23); + cpp_set_lang (parse_in, iso ? CLK_STDC23 : CLK_GNUC23); flag_no_asm = iso; flag_no_nonansi_builtin = iso; flag_iso = iso; @@ -1909,7 +1909,7 @@ set_std_c2y (int iso) static void set_std_cxx98 (int iso) { - cpp_set_lang (parse_in, iso ? CLK_CXX98: CLK_GNUCXX); + cpp_set_lang (parse_in, iso ? CLK_CXX98 : CLK_GNUCXX); flag_no_gnu_keywords = iso; flag_no_nonansi_builtin = iso; flag_iso = iso; @@ -1923,7 +1923,7 @@ set_std_cxx98 (int iso) static void set_std_cxx11 (int iso) { - cpp_set_lang (parse_in, iso ? CLK_CXX11: CLK_GNUCXX11); + cpp_set_lang (parse_in, iso ? CLK_CXX11 : CLK_GNUCXX11); flag_no_gnu_keywords = iso; flag_no_nonansi_builtin = iso; flag_iso = iso; @@ -1938,7 +1938,7 @@ set_std_cxx11 (int iso) static void set_std_cxx14 (int iso) { - cpp_set_lang (parse_in, iso ? CLK_CXX14: CLK_GNUCXX14); + cpp_set_lang (parse_in, iso ? CLK_CXX14 : CLK_GNUCXX14); flag_no_gnu_keywords = iso; flag_no_nonansi_builtin = iso; flag_iso = iso; @@ -1953,7 +1953,7 @@ set_std_cxx14 (int iso) static void set_std_cxx17 (int iso) { - cpp_set_lang (parse_in, iso ? CLK_CXX17: CLK_GNUCXX17); + cpp_set_lang (parse_in, iso ? CLK_CXX17 : CLK_GNUCXX17); flag_no_gnu_keywords = iso; flag_no_nonansi_builtin = iso; flag_iso = iso; @@ -1969,7 +1969,7 @@ set_std_cxx17 (int iso) static void set_std_cxx20 (int iso) { - cpp_set_lang (parse_in, iso ? CLK_CXX20: CLK_GNUCXX20); + cpp_set_lang (parse_in, iso ? CLK_CXX20 : CLK_GNUCXX20); flag_no_gnu_keywords = iso; flag_no_nonansi_builtin = iso; flag_iso = iso; @@ -1987,7 +1987,7 @@ set_std_cxx20 (int iso) static void set_std_cxx23 (int iso) { - cpp_set_lang (parse_in, iso ? CLK_CXX23: CLK_GNUCXX23); + cpp_set_lang (parse_in, iso ? CLK_CXX23 : CLK_GNUCXX23); flag_no_gnu_keywords = iso; flag_no_nonansi_builtin = iso; flag_iso = iso; @@ -2005,7 +2005,7 @@ set_std_cxx23 (int iso) static void set_std_cxx26 (int iso) { - cpp_set_lang (parse_in, iso ? CLK_CXX26: CLK_GNUCXX26); + cpp_set_lang (parse_in, iso ? CLK_CXX26 : CLK_GNUCXX26); flag_no_gnu_keywords = iso; flag_no_nonansi_builtin = iso; flag_iso = iso; diff --git a/gcc/cfgcleanup.cc b/gcc/cfgcleanup.cc index a3b2e93fa510dbcddb634fb3d6884f77762c0644..004db1063f6cbecd5351861d145176875f323695 100644 --- a/gcc/cfgcleanup.cc +++ b/gcc/cfgcleanup.cc @@ -1862,9 +1862,9 @@ outgoing_edges_match (int mode, basic_block bb1, basic_block bb2) if (fallthru1) { basic_block d1 = (FORWARDER_BLOCK_P (fallthru1->dest) - ? single_succ (fallthru1->dest): fallthru1->dest); + ? single_succ (fallthru1->dest) : fallthru1->dest); basic_block d2 = (FORWARDER_BLOCK_P (fallthru2->dest) - ? single_succ (fallthru2->dest): fallthru2->dest); + ? single_succ (fallthru2->dest) : fallthru2->dest); if (d1 != d2) return false; diff --git a/gcc/cgraph.cc b/gcc/cgraph.cc index 39a3adbc7c357da110f8413867dffe7952c3e5f2..b5d096d530c033adf7bce9c2cb19e44f0c505e2e 100644 --- a/gcc/cgraph.cc +++ b/gcc/cgraph.cc @@ -2309,7 +2309,7 @@ cgraph_node::dump (FILE *f) if (edge->indirect_info->agg_contents) fprintf (f, "loaded from %s %s at offset %i ", edge->indirect_info->member_ptr ? "member ptr" : "aggregate", - edge->indirect_info->by_ref ? "passed by reference":"", + edge->indirect_info->by_ref ? "passed by reference" : "", (int)edge->indirect_info->offset); if (edge->indirect_info->vptr_changed) fprintf (f, "(vptr maybe changed) "); diff --git a/gcc/config/arc/arc.cc b/gcc/config/arc/arc.cc index a225adeff5738ab41fbe92fd3e9cb5872498eaeb..ba7bde1de4430ab518c2bd27967f12349e4a2532 100644 --- a/gcc/config/arc/arc.cc +++ b/gcc/config/arc/arc.cc @@ -9674,7 +9674,7 @@ arc_delegitimize_address (rtx orig_x) rtx gen_acc1 (void) { - return gen_rtx_REG (SImode, TARGET_BIG_ENDIAN ? 56: 57); + return gen_rtx_REG (SImode, TARGET_BIG_ENDIAN ? 56 : 57); } /* Return a REG rtx for acc2. N.B. the gcc-internal representation may @@ -9684,7 +9684,7 @@ gen_acc1 (void) rtx gen_acc2 (void) { - return gen_rtx_REG (SImode, TARGET_BIG_ENDIAN ? 57: 56); + return gen_rtx_REG (SImode, TARGET_BIG_ENDIAN ? 57 : 56); } /* When estimating sizes during arc_reorg, when optimizing for speed, there diff --git a/gcc/config/arc/arc.h b/gcc/config/arc/arc.h index 4cadef7a2b2b75a3edd8fb50acdd2e23776841cb..1d3bc375b1636a00fcc883e5a005f911e786f0af 100644 --- a/gcc/config/arc/arc.h +++ b/gcc/config/arc/arc.h @@ -608,8 +608,8 @@ extern enum reg_class arc_regno_reg_class[]; needed to represent mode MODE in a register of class CLASS. */ #define CLASS_MAX_NREGS(CLASS, MODE) \ -(( GET_MODE_SIZE (MODE) == 16 && CLASS == SIMD_VR_REGS) ? 1: \ -((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD)) +((GET_MODE_SIZE (MODE) == 16 && CLASS == SIMD_VR_REGS) ? 1 \ + : ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD)) #define SMALL_INT(X) ((unsigned) ((X) + 0x100) < 0x200) #define SMALL_INT_RANGE(X, OFFSET, SHIFT) \ @@ -868,9 +868,9 @@ extern int arc_initial_elimination_offset(int from, int to); /* Recognize any constant value that is a valid address. */ #define CONSTANT_ADDRESS_P(X) \ - (flag_pic ? (arc_legitimate_pic_addr_p (X) || LABEL_P (X)): \ - (GET_CODE (X) == LABEL_REF || GET_CODE (X) == SYMBOL_REF \ - || GET_CODE (X) == CONST_INT || GET_CODE (X) == CONST)) + (flag_pic ? (arc_legitimate_pic_addr_p (X) || LABEL_P (X)) \ + : (GET_CODE (X) == LABEL_REF || GET_CODE (X) == SYMBOL_REF \ + || GET_CODE (X) == CONST_INT || GET_CODE (X) == CONST)) /* Is the argument a const_int rtx, containing an exact power of 2 */ #define IS_POWEROF2_P(X) (! ( (X) & ((X) - 1)) && (X)) diff --git a/gcc/config/arm/arm.cc b/gcc/config/arm/arm.cc index 5c11621327e15b7212b2290769cc0a922347ce2d..50dd005ba10a48a0e53c14bde1910f7be32c3ac4 100644 --- a/gcc/config/arm/arm.cc +++ b/gcc/config/arm/arm.cc @@ -24730,11 +24730,11 @@ arm_print_operand (FILE *stream, rtx x, int code) asm_fprintf (stream, "[%r", REGNO (XEXP (addr, 0))); inc_val = GET_MODE_SIZE (GET_MODE (x)); if (code == POST_INC || code == POST_DEC) - asm_fprintf (stream, "], #%s%d",(code == POST_INC) - ? "": "-", inc_val); + asm_fprintf (stream, "], #%s%d", (code == POST_INC) + ? "" : "-", inc_val); else - asm_fprintf (stream, ", #%s%d]!",(code == PRE_INC) - ? "": "-", inc_val); + asm_fprintf (stream, ", #%s%d]!", (code == PRE_INC) + ? "" : "-", inc_val); } else if (code == POST_MODIFY || code == PRE_MODIFY) { @@ -24743,9 +24743,9 @@ arm_print_operand (FILE *stream, rtx x, int code) if (postinc_reg && CONST_INT_P (postinc_reg)) { if (code == POST_MODIFY) - asm_fprintf (stream, "], #%wd",INTVAL (postinc_reg)); + asm_fprintf (stream, "], #%wd", INTVAL (postinc_reg)); else - asm_fprintf (stream, ", #%wd]!",INTVAL (postinc_reg)); + asm_fprintf (stream, ", #%wd]!", INTVAL (postinc_reg)); } } else if (code == PLUS) diff --git a/gcc/config/cris/cris.md b/gcc/config/cris/cris.md index e066d5c920a94fdc3769f2d01f1338fb57fa927d..55f4d106eec42a59cc20c6176ce864774570b564 100644 --- a/gcc/config/cris/cris.md +++ b/gcc/config/cris/cris.md @@ -2418,7 +2418,7 @@ (pc)))] "reload_completed" { - return <MODE>mode == CC_NZmode ? "b<oCC> %l0%#": "b<CC> %l0%#"; + return <MODE>mode == CC_NZmode ? "b<oCC> %l0%#" : "b<CC> %l0%#"; } [(set_attr "slottable" "has_slot")]) diff --git a/gcc/config/darwin-driver.cc b/gcc/config/darwin-driver.cc index eabe9bc970d15d9fdd7982de5cdb30489186e5dc..546ca242129bec14074ad53de9629db9972c56d3 100644 --- a/gcc/config/darwin-driver.cc +++ b/gcc/config/darwin-driver.cc @@ -370,7 +370,7 @@ darwin_driver_init (unsigned int *decoded_options_count, { if (seenX86_64 || seenM64) { - const char *op = (seenX86_64? "-arch x86_64": "-m64"); + const char *op = (seenX86_64 ? "-arch x86_64" : "-m64"); warning (0, "%qs conflicts with %<-arch i386%> (%qs ignored)", op, op); } @@ -393,7 +393,7 @@ darwin_driver_init (unsigned int *decoded_options_count, { if (seenPPC64 || seenM64) { - const char *op = (seenPPC64? "-arch ppc64": "-m64"); + const char *op = (seenPPC64 ? "-arch ppc64" : "-m64"); warning (0, "%qs conflicts with %<-arch ppc%> (%qs ignored)", op, op); } diff --git a/gcc/config/darwin.cc b/gcc/config/darwin.cc index 9129378be3739b93a58bb9011b79934c7f874614..47e41ac8a1234e10c9cdeb70b04d6c63ae535e7b 100644 --- a/gcc/config/darwin.cc +++ b/gcc/config/darwin.cc @@ -2403,7 +2403,7 @@ darwin_asm_declare_object_name (FILE *file, #ifdef DEBUG_DARWIN_MEM_ALLOCATORS fprintf (file, "# dadon: %s %s (%llu, %u) local %d weak %d" " stat %d com %d pub %d t-const %d t-ro %d init %lx\n", - xname, (TREE_CODE (decl) == VAR_DECL?"var":"const"), + xname, TREE_CODE (decl) == VAR_DECL ? "var" : "const", (unsigned long long)size, DECL_ALIGN (decl), local_def, DECL_WEAK (decl), TREE_STATIC (decl), DECL_COMMON (decl), TREE_PUBLIC (decl), TREE_CONSTANT (decl), TREE_READONLY (decl), @@ -2641,7 +2641,7 @@ darwin_emit_common (FILE *fp, const char *name, fputs ("\t.comm\t", fp); assemble_name (fp, name); fprintf (fp, "," HOST_WIDE_INT_PRINT_UNSIGNED, - emit_aligned_common?size:rounded); + emit_aligned_common ? size : rounded); if (l2align && emit_aligned_common) fprintf (fp, ",%u", l2align); fputs ("\n", fp); diff --git a/gcc/config/epiphany/epiphany.md b/gcc/config/epiphany/epiphany.md index 395ddd5d5883e3bf257020b6d2636d2340c52989..af6cd39ece396f377c93af06f37d24b724d147a4 100644 --- a/gcc/config/epiphany/epiphany.md +++ b/gcc/config/epiphany/epiphany.md @@ -2187,14 +2187,14 @@ if (epiphany_uninterruptible_p (current_function_decl) != target_uninterruptible) { - emit_insn (target_uninterruptible ? gen_gid (): gen_gie ()); + emit_insn (target_uninterruptible ? gen_gid () : gen_gie ()); emit_call_insn (gen_rtx_PARALLEL (VOIDmode, gen_rtvec (2, gen_rtx_CALL (VOIDmode, operands[0], operands[1]), gen_rtx_CLOBBER (VOIDmode, gen_rtx_REG (SImode, GPR_LR))))); - emit_insn (target_uninterruptible ? gen_gie (): gen_gid ()); + emit_insn (target_uninterruptible ? gen_gie () : gen_gid ()); DONE; } }) @@ -2225,13 +2225,13 @@ if (epiphany_uninterruptible_p (current_function_decl) != target_uninterruptible) { - emit_insn (target_uninterruptible ? gen_gid (): gen_gie ()); + emit_insn (target_uninterruptible ? gen_gid () : gen_gie ()); emit_call_insn (gen_rtx_PARALLEL (VOIDmode, gen_rtvec (2, gen_rtx_CALL (VOIDmode, operands[0], operands[1]), ret_rtx))); - emit_insn (target_uninterruptible ? gen_gie (): gen_gid ()); + emit_insn (target_uninterruptible ? gen_gie () : gen_gid ()); DONE; } }) @@ -2264,7 +2264,7 @@ if (epiphany_uninterruptible_p (current_function_decl) != target_uninterruptible) { - emit_insn (target_uninterruptible ? gen_gid (): gen_gie ()); + emit_insn (target_uninterruptible ? gen_gid () : gen_gie ()); emit_call_insn (gen_rtx_PARALLEL (VOIDmode, @@ -2273,7 +2273,7 @@ gen_rtx_CALL (VOIDmode, operands[1], operands[2])), gen_rtx_CLOBBER (VOIDmode, gen_rtx_REG (SImode, GPR_LR))))); - emit_insn (target_uninterruptible ? gen_gie (): gen_gid ()); + emit_insn (target_uninterruptible ? gen_gie () : gen_gid ()); DONE; } }) @@ -2307,7 +2307,7 @@ if (epiphany_uninterruptible_p (current_function_decl) != target_uninterruptible) { - emit_insn (target_uninterruptible ? gen_gid (): gen_gie ()); + emit_insn (target_uninterruptible ? gen_gid () : gen_gie ()); emit_call_insn (gen_rtx_PARALLEL (VOIDmode, @@ -2315,7 +2315,7 @@ (operands[0], gen_rtx_CALL (VOIDmode, operands[1], operands[2])), ret_rtx))); - emit_insn (target_uninterruptible ? gen_gie (): gen_gid ()); + emit_insn (target_uninterruptible ? gen_gie () : gen_gid ()); DONE; } }) diff --git a/gcc/config/i386/i386.cc b/gcc/config/i386/i386.cc index a1f0ae7a7e167e4318a563bbc895835ce54fa3a2..68d038da3f909b673a1871906a44fa65a6fef64b 100644 --- a/gcc/config/i386/i386.cc +++ b/gcc/config/i386/i386.cc @@ -6580,8 +6580,8 @@ gen_push2 (rtx mem, rtx reg1, rtx reg2, bool ppx_p = false) if (REG_P (reg2) && GET_MODE (reg2) != word_mode) reg2 = gen_rtx_REG (word_mode, REGNO (reg2)); - return ppx_p ? gen_push2p_di (mem, reg1, reg2): - gen_push2_di (mem, reg1, reg2); + return ppx_p ? gen_push2p_di (mem, reg1, reg2) + : gen_push2_di (mem, reg1, reg2); } /* Return >= 0 if there is an unused call-clobbered register available diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h index f5204aa1ed23ec59e4d7fbe7212bb96b645955de..f3c98f585f8cabf8ef7a0cb70cddf0ec50a664f3 100644 --- a/gcc/config/i386/i386.h +++ b/gcc/config/i386/i386.h @@ -238,7 +238,7 @@ extern const struct processor_costs *ix86_cost; extern const struct processor_costs ix86_size_cost; #define ix86_cur_cost() \ - (optimize_insn_for_size_p () ? &ix86_size_cost: ix86_cost) + (optimize_insn_for_size_p () ? &ix86_size_cost : ix86_cost) /* Macros used in the machine description to test the flags. */ diff --git a/gcc/config/i386/openbsdelf.h b/gcc/config/i386/openbsdelf.h index 3b7c27b43dc2ef933401ac3d9653aaea976d10d9..89982b952eadcd21cb89cda8d90e57f958cf9412 100644 --- a/gcc/config/i386/openbsdelf.h +++ b/gcc/config/i386/openbsdelf.h @@ -67,7 +67,7 @@ along with GCC; see the file COPYING3. If not see The icky part is not here, but in <machine/profile.h>. */ #undef FUNCTION_PROFILER #define FUNCTION_PROFILER(FILE, LABELNO) \ - fputs (flag_pic ? "\tcall __mcount@PLT\n": "\tcall __mcount\n", FILE); + fputs (flag_pic ? "\tcall __mcount@PLT\n" : "\tcall __mcount\n", FILE); #undef LINK_SPEC #define LINK_SPEC \ diff --git a/gcc/config/loongarch/loongarch-c.cc b/gcc/config/loongarch/loongarch-c.cc index c6763647cd13ab9af32b9d5b4b37d55667461349..97e1baffc42b08c7e25eee7655b9a3874dce4290 100644 --- a/gcc/config/loongarch/loongarch-c.cc +++ b/gcc/config/loongarch/loongarch-c.cc @@ -116,7 +116,7 @@ loongarch_cpu_cpp_builtins (cpp_reader *pfile) max_v_major = major > max_v_major ? major : max_v_major; max_v_minor = major == max_v_major - ? (minor > max_v_minor ? minor : max_v_minor): max_v_minor; + ? (minor > max_v_minor ? minor : max_v_minor) : max_v_minor; } /* Find the minimum ISA version required to run the target program. */ diff --git a/gcc/config/loongarch/loongarch-cpu.cc b/gcc/config/loongarch/loongarch-cpu.cc index 8564ebb24eeab8f99478c9172eea24819b0e1096..343751b657928482617306405a0904239a13f0f2 100644 --- a/gcc/config/loongarch/loongarch-cpu.cc +++ b/gcc/config/loongarch/loongarch-cpu.cc @@ -265,11 +265,11 @@ fill_native_cpu_config (struct loongarch_target *tgt) l1u_present |= cpucfg_cache[16] & 3; /* bit[1:0]: unified l1 */ l1d_present |= cpucfg_cache[16] & 4; /* bit[2:2]: l1d */ l1_szword = l1d_present ? 18 : (l1u_present ? 17 : 0); - l1_szword = l1_szword ? cpucfg_cache[l1_szword]: 0; + l1_szword = l1_szword ? cpucfg_cache[l1_szword] : 0; l2d_present |= cpucfg_cache[16] & 24; /* bit[4:3]: unified l2 */ l2d_present |= cpucfg_cache[16] & 128; /* bit[7:7]: l2d */ - l2_szword = l2d_present ? cpucfg_cache[19]: 0; + l2_szword = l2d_present ? cpucfg_cache[19] : 0; native_cache.l1d_line_size = 1 << ((l1_szword & 0x7f000000) >> 24); /* bit[30:24]: log2(line) */ diff --git a/gcc/config/riscv/riscv.cc b/gcc/config/riscv/riscv.cc index e111cb07284028646dd61302e35234e197ae10ed..3ac40234345a988fbfe7524731c7866f8297523b 100644 --- a/gcc/config/riscv/riscv.cc +++ b/gcc/config/riscv/riscv.cc @@ -6622,8 +6622,8 @@ riscv_union_memmodels (enum memmodel model1, enum memmodel model2) model1 = memmodel_base (model1); model2 = memmodel_base (model2); - enum memmodel weaker = model1 <= model2 ? model1: model2; - enum memmodel stronger = model1 > model2 ? model1: model2; + enum memmodel weaker = model1 <= model2 ? model1 : model2; + enum memmodel stronger = model1 > model2 ? model1 : model2; switch (stronger) { diff --git a/gcc/config/riscv/zc.md b/gcc/config/riscv/zc.md index 5b948b41586f8d9e485694e3d67b3a7dc30c77af..6dc47da3acc949c8cff48ad60099fd51fa4a6efd 100644 --- a/gcc/config/riscv/zc.md +++ b/gcc/config/riscv/zc.md @@ -1442,7 +1442,7 @@ (match_operand:X 3 "zcmp_mv_sreg_operand" "r"))] "TARGET_ZCMP && (REGNO (operands[2]) != REGNO (operands[0]))" - { return (REGNO (operands[0]) == A0_REGNUM)?"cm.mva01s\t%1,%3":"cm.mva01s\t%3,%1"; } + { return (REGNO (operands[0]) == A0_REGNUM) ? "cm.mva01s\t%1,%3" : "cm.mva01s\t%3,%1"; } [(set_attr "mode" "<X:MODE>") (set_attr "type" "mvpair")]) @@ -1454,6 +1454,6 @@ "TARGET_ZCMP && (REGNO (operands[0]) != REGNO (operands[2])) && (REGNO (operands[1]) != REGNO (operands[3]))" - { return (REGNO (operands[1]) == A0_REGNUM)?"cm.mvsa01\t%0,%2":"cm.mvsa01\t%2,%0"; } + { return (REGNO (operands[1]) == A0_REGNUM) ? "cm.mvsa01\t%0,%2" : "cm.mvsa01\t%2,%0"; } [(set_attr "mode" "<X:MODE>") (set_attr "type" "mvpair")]) diff --git a/gcc/config/rs6000/mmintrin.h b/gcc/config/rs6000/mmintrin.h index c7988c1c3146c23f7f30ba38b1e813ca738fcf8c..68c06aa0265f233d821ca03509f18ebd68d28308 100644 --- a/gcc/config/rs6000/mmintrin.h +++ b/gcc/config/rs6000/mmintrin.h @@ -743,14 +743,14 @@ _mm_cmpeq_pi8 (__m64 __m1, __m64 __m2) __mu1.as_m64 = __m1; __mu2.as_m64 = __m2; - __res.as_char[0] = (__mu1.as_char[0] == __mu2.as_char[0])? -1: 0; - __res.as_char[1] = (__mu1.as_char[1] == __mu2.as_char[1])? -1: 0; - __res.as_char[2] = (__mu1.as_char[2] == __mu2.as_char[2])? -1: 0; - __res.as_char[3] = (__mu1.as_char[3] == __mu2.as_char[3])? -1: 0; - __res.as_char[4] = (__mu1.as_char[4] == __mu2.as_char[4])? -1: 0; - __res.as_char[5] = (__mu1.as_char[5] == __mu2.as_char[5])? -1: 0; - __res.as_char[6] = (__mu1.as_char[6] == __mu2.as_char[6])? -1: 0; - __res.as_char[7] = (__mu1.as_char[7] == __mu2.as_char[7])? -1: 0; + __res.as_char[0] = (__mu1.as_char[0] == __mu2.as_char[0]) ? -1 : 0; + __res.as_char[1] = (__mu1.as_char[1] == __mu2.as_char[1]) ? -1 : 0; + __res.as_char[2] = (__mu1.as_char[2] == __mu2.as_char[2]) ? -1 : 0; + __res.as_char[3] = (__mu1.as_char[3] == __mu2.as_char[3]) ? -1 : 0; + __res.as_char[4] = (__mu1.as_char[4] == __mu2.as_char[4]) ? -1 : 0; + __res.as_char[5] = (__mu1.as_char[5] == __mu2.as_char[5]) ? -1 : 0; + __res.as_char[6] = (__mu1.as_char[6] == __mu2.as_char[6]) ? -1 : 0; + __res.as_char[7] = (__mu1.as_char[7] == __mu2.as_char[7]) ? -1 : 0; return (__m64) __res.as_m64; #endif @@ -778,14 +778,14 @@ _mm_cmpgt_pi8 (__m64 __m1, __m64 __m2) __mu1.as_m64 = __m1; __mu2.as_m64 = __m2; - __res.as_char[0] = (__mu1.as_char[0] > __mu2.as_char[0])? -1: 0; - __res.as_char[1] = (__mu1.as_char[1] > __mu2.as_char[1])? -1: 0; - __res.as_char[2] = (__mu1.as_char[2] > __mu2.as_char[2])? -1: 0; - __res.as_char[3] = (__mu1.as_char[3] > __mu2.as_char[3])? -1: 0; - __res.as_char[4] = (__mu1.as_char[4] > __mu2.as_char[4])? -1: 0; - __res.as_char[5] = (__mu1.as_char[5] > __mu2.as_char[5])? -1: 0; - __res.as_char[6] = (__mu1.as_char[6] > __mu2.as_char[6])? -1: 0; - __res.as_char[7] = (__mu1.as_char[7] > __mu2.as_char[7])? -1: 0; + __res.as_char[0] = (__mu1.as_char[0] > __mu2.as_char[0]) ? -1 : 0; + __res.as_char[1] = (__mu1.as_char[1] > __mu2.as_char[1]) ? -1 : 0; + __res.as_char[2] = (__mu1.as_char[2] > __mu2.as_char[2]) ? -1 : 0; + __res.as_char[3] = (__mu1.as_char[3] > __mu2.as_char[3]) ? -1 : 0; + __res.as_char[4] = (__mu1.as_char[4] > __mu2.as_char[4]) ? -1 : 0; + __res.as_char[5] = (__mu1.as_char[5] > __mu2.as_char[5]) ? -1 : 0; + __res.as_char[6] = (__mu1.as_char[6] > __mu2.as_char[6]) ? -1 : 0; + __res.as_char[7] = (__mu1.as_char[7] > __mu2.as_char[7]) ? -1 : 0; return (__m64) __res.as_m64; #endif @@ -815,10 +815,10 @@ _mm_cmpeq_pi16 (__m64 __m1, __m64 __m2) __mu1.as_m64 = __m1; __mu2.as_m64 = __m2; - __res.as_short[0] = (__mu1.as_short[0] == __mu2.as_short[0])? -1: 0; - __res.as_short[1] = (__mu1.as_short[1] == __mu2.as_short[1])? -1: 0; - __res.as_short[2] = (__mu1.as_short[2] == __mu2.as_short[2])? -1: 0; - __res.as_short[3] = (__mu1.as_short[3] == __mu2.as_short[3])? -1: 0; + __res.as_short[0] = (__mu1.as_short[0] == __mu2.as_short[0]) ? -1 : 0; + __res.as_short[1] = (__mu1.as_short[1] == __mu2.as_short[1]) ? -1 : 0; + __res.as_short[2] = (__mu1.as_short[2] == __mu2.as_short[2]) ? -1 : 0; + __res.as_short[3] = (__mu1.as_short[3] == __mu2.as_short[3]) ? -1 : 0; return (__m64) __res.as_m64; #endif @@ -846,10 +846,10 @@ _mm_cmpgt_pi16 (__m64 __m1, __m64 __m2) __mu1.as_m64 = __m1; __mu2.as_m64 = __m2; - __res.as_short[0] = (__mu1.as_short[0] > __mu2.as_short[0])? -1: 0; - __res.as_short[1] = (__mu1.as_short[1] > __mu2.as_short[1])? -1: 0; - __res.as_short[2] = (__mu1.as_short[2] > __mu2.as_short[2])? -1: 0; - __res.as_short[3] = (__mu1.as_short[3] > __mu2.as_short[3])? -1: 0; + __res.as_short[0] = (__mu1.as_short[0] > __mu2.as_short[0]) ? -1 : 0; + __res.as_short[1] = (__mu1.as_short[1] > __mu2.as_short[1]) ? -1 : 0; + __res.as_short[2] = (__mu1.as_short[2] > __mu2.as_short[2]) ? -1 : 0; + __res.as_short[3] = (__mu1.as_short[3] > __mu2.as_short[3]) ? -1 : 0; return (__m64) __res.as_m64; #endif @@ -879,8 +879,8 @@ _mm_cmpeq_pi32 (__m64 __m1, __m64 __m2) __mu1.as_m64 = __m1; __mu2.as_m64 = __m2; - __res.as_int[0] = (__mu1.as_int[0] == __mu2.as_int[0])? -1: 0; - __res.as_int[1] = (__mu1.as_int[1] == __mu2.as_int[1])? -1: 0; + __res.as_int[0] = (__mu1.as_int[0] == __mu2.as_int[0]) ? -1 : 0; + __res.as_int[1] = (__mu1.as_int[1] == __mu2.as_int[1]) ? -1 : 0; return (__m64) __res.as_m64; #endif @@ -908,8 +908,8 @@ _mm_cmpgt_pi32 (__m64 __m1, __m64 __m2) __mu1.as_m64 = __m1; __mu2.as_m64 = __m2; - __res.as_int[0] = (__mu1.as_int[0] > __mu2.as_int[0])? -1: 0; - __res.as_int[1] = (__mu1.as_int[1] > __mu2.as_int[1])? -1: 0; + __res.as_int[0] = (__mu1.as_int[0] > __mu2.as_int[0]) ? -1 : 0; + __res.as_int[1] = (__mu1.as_int[1] > __mu2.as_int[1]) ? -1 : 0; return (__m64) __res.as_m64; #endif diff --git a/gcc/config/v850/predicates.md b/gcc/config/v850/predicates.md index 3e76bdaa75fc184e8fdccebd26d64b38b85f43f9..751cf72a723a8867df929b1e23e8161cdf4eaf18 100644 --- a/gcc/config/v850/predicates.md +++ b/gcc/config/v850/predicates.md @@ -182,7 +182,7 @@ */ - for (i = 2; i < count - (TARGET_LONG_CALLS ? 2: 1); i++) + for (i = 2; i < count - (TARGET_LONG_CALLS ? 2 : 1); i++) { rtx dest; rtx src; diff --git a/gcc/config/xtensa/constraints.md b/gcc/config/xtensa/constraints.md index d855fb8d60578d2bc435f09ac3a8c03eb14baca1..c96959ed0e522984c2a43b2ddcaf29b2aa5cf247 100644 --- a/gcc/config/xtensa/constraints.md +++ b/gcc/config/xtensa/constraints.md @@ -32,7 +32,7 @@ General-purpose AR registers for indirect sibling calls, @code{a2}- @code{a8}.") -(define_register_constraint "d" "TARGET_DENSITY ? AR_REGS: NO_REGS" +(define_register_constraint "d" "TARGET_DENSITY ? AR_REGS : NO_REGS" "@internal All AR registers, including sp, but only if the Xtensa Code Density Option is configured.") @@ -53,7 +53,7 @@ General-purpose AR registers, but only if the Xtensa Sign Extend Option is configured.") -(define_register_constraint "C" "TARGET_MUL16 ? GR_REGS: NO_REGS" +(define_register_constraint "C" "TARGET_MUL16 ? GR_REGS : NO_REGS" "@internal General-purpose AR registers, but only if the Xtensa 16-Bit Integer Multiply Option is configured.") @@ -63,7 +63,7 @@ General-purpose AR registers, but only if the Xtensa Code Density Option is configured.") -(define_register_constraint "W" "TARGET_CONST16 ? GR_REGS: NO_REGS" +(define_register_constraint "W" "TARGET_CONST16 ? GR_REGS : NO_REGS" "@internal General-purpose AR registers, but only if the Xtensa Const16 Option is configured.") diff --git a/gcc/coverage.cc b/gcc/coverage.cc index 22778361da13b26e7d9b1225df767145f088be9a..a964ed5a48fe5126eb01151385f776895c837e52 100644 --- a/gcc/coverage.cc +++ b/gcc/coverage.cc @@ -658,7 +658,7 @@ coverage_begin_function (unsigned lineno_checksum, unsigned cfg_checksum) int end_line = endloc.file == startloc.file ? endloc.line : startloc.line; int end_column - = endloc.file == startloc.file ? endloc.column: startloc.column; + = endloc.file == startloc.file ? endloc.column : startloc.column; if (startloc.line > end_line) { @@ -1089,8 +1089,8 @@ build_init_ctor (tree gcov_info_type) append_to_statement_list (stmt, &ctor); /* Generate a constructor to run it. */ - int priority = SUPPORTS_INIT_PRIORITY - ? MAX_RESERVED_INIT_PRIORITY: DEFAULT_INIT_PRIORITY; + int priority = (SUPPORTS_INIT_PRIORITY + ? MAX_RESERVED_INIT_PRIORITY : DEFAULT_INIT_PRIORITY); cgraph_build_static_cdtor ('I', ctor, priority); } @@ -1112,8 +1112,8 @@ build_gcov_exit_decl (void) append_to_statement_list (stmt, &dtor); /* Generate a destructor to run it. */ - int priority = SUPPORTS_INIT_PRIORITY - ? MAX_RESERVED_INIT_PRIORITY: DEFAULT_INIT_PRIORITY; + int priority = (SUPPORTS_INIT_PRIORITY + ? MAX_RESERVED_INIT_PRIORITY : DEFAULT_INIT_PRIORITY); cgraph_build_static_cdtor ('D', dtor, priority); } diff --git a/gcc/cp/search.cc b/gcc/cp/search.cc index b0421ee0524704780c9d0d3155a2cfd95d1b369a..54eb4f4010f2ee2f37bf3229d2419e2f14c11144 100644 --- a/gcc/cp/search.cc +++ b/gcc/cp/search.cc @@ -1290,7 +1290,7 @@ lookup_member (tree xbasetype, tree name, int protect, bool want_type, && !dguide_name_p (name)) rval = build_baselink (rval_binfo, basetype_path, rval, (IDENTIFIER_CONV_OP_P (name) - ? TREE_TYPE (name): NULL_TREE)); + ? TREE_TYPE (name) : NULL_TREE)); return rval; } diff --git a/gcc/cp/typeck.cc b/gcc/cp/typeck.cc index d1204d922bbd65e0ee2a9a18a444f661e1b97302..71d879abef12a2d6670cabcb56de0617021c6494 100644 --- a/gcc/cp/typeck.cc +++ b/gcc/cp/typeck.cc @@ -9829,7 +9829,7 @@ cp_build_modify_expr (location_t loc, tree lhs, enum tree_code modifycode, } from_array = TREE_CODE (TREE_TYPE (newrhs)) == ARRAY_TYPE - ? 1 + (modifycode != INIT_EXPR): 0; + ? 1 + (modifycode != INIT_EXPR) : 0; result = build_vec_init (lhs, NULL_TREE, newrhs, /*explicit_value_init_p=*/false, from_array, complain); diff --git a/gcc/df-problems.cc b/gcc/df-problems.cc index bfd24bd1e86c478a49bc4002dd97a73e61e7c4ac..f1dba2b5540e57fed8bd25b083a2cd064d5df3ed 100644 --- a/gcc/df-problems.cc +++ b/gcc/df-problems.cc @@ -3532,7 +3532,7 @@ df_create_unused_note (rtx_insn *insn, df_ref def, || df_ignore_stack_reg (dregno))) { rtx reg = (DF_REF_LOC (def)) - ? *DF_REF_REAL_LOC (def): DF_REF_REG (def); + ? *DF_REF_REAL_LOC (def) : DF_REF_REG (def); df_set_note (REG_UNUSED, insn, reg); dead_debug_insert_temp (debug, dregno, insn, DEBUG_TEMP_AFTER_WITH_REG); if (REG_DEAD_DEBUGGING) diff --git a/gcc/diagnostic-path.cc b/gcc/diagnostic-path.cc index 3f7d4fb50156c004dea278865bef053e14c8ad1b..2c42807cced96bcc7f3124db3070c4a64a519a9a 100644 --- a/gcc/diagnostic-path.cc +++ b/gcc/diagnostic-path.cc @@ -795,7 +795,7 @@ path_summary::path_summary (const path_print_policy &policy, continue; auto theme = policy.get_diagram_theme (); - const bool allow_emojis = theme ? theme->emojis_p (): false; + const bool allow_emojis = theme ? theme->emojis_p () : false; cur_event_range = new event_range (path, idx, event, pts, show_event_links, colorize, diff --git a/gcc/diagnostic.cc b/gcc/diagnostic.cc index 41656a607b819ff45dff6e39d9e7f3cce104d4d1..5e092cc2d47539cab3cb0c0618908b0703f0cd09 100644 --- a/gcc/diagnostic.cc +++ b/gcc/diagnostic.cc @@ -118,7 +118,7 @@ diagnostic_set_caret_max_width (diagnostic_context *context, int value) /* One minus to account for the leading empty space. */ value = value ? value - 1 : (isatty (fileno (pp_buffer (context->m_printer)->m_stream)) - ? get_terminal_width () - 1: INT_MAX); + ? get_terminal_width () - 1 : INT_MAX); if (value <= 0) value = INT_MAX; diff --git a/gcc/expr.cc b/gcc/expr.cc index ed64ccea76631f0d26511756b2ad184e26789794..b7a04f76fbf6687949f3f0c0c0e9ac3f0b1b9e23 100644 --- a/gcc/expr.cc +++ b/gcc/expr.cc @@ -9670,7 +9670,7 @@ expand_expr_divmod (tree_code code, machine_mode mode, tree treeop0, if (dump_file && (dump_flags & TDF_DETAILS)) fprintf(dump_file, "positive division:%s unsigned cost: %u; " - "signed cost: %u\n", was_tie ? "(needed tie breaker)":"", + "signed cost: %u\n", was_tie ? "(needed tie breaker)" : "", uns_cost, sgn_cost); if (uns_cost < sgn_cost || (uns_cost == sgn_cost && unsignedp)) diff --git a/gcc/gcov-dump.cc b/gcc/gcov-dump.cc index 375058c3c7b766b9aa9cf22f4218ea4841b3f4a5..731172f39ee12b08259a8e8686e00f7577a3720d 100644 --- a/gcc/gcov-dump.cc +++ b/gcc/gcov-dump.cc @@ -299,8 +299,8 @@ dump_gcov_file (const char *filename) gcov_sync (base, length); if ((error = gcov_is_error ())) { - printf (error < 0 ? "%s:counter overflow at %lu\n" : - "%s:read error at %lu\n", filename, + printf (error < 0 ? "%s:counter overflow at %lu\n" + : "%s:read error at %lu\n", filename, (long unsigned) gcov_position ()); break; } diff --git a/gcc/gcov.cc b/gcc/gcov.cc index e1334e75012b02bfa7ac8b8b4de96217081d7fe4..514ff1c93b997cfcc1ebecffa704df08a0a04143 100644 --- a/gcc/gcov.cc +++ b/gcc/gcov.cc @@ -2733,7 +2733,7 @@ format_gcov (gcov_type top, gcov_type bottom, int decimal_places) if (decimal_places >= 0) { - float ratio = bottom ? 100.0f * top / bottom: 0; + float ratio = bottom ? 100.0f * top / bottom : 0; /* Round up to 1% if there's a small non-zero value. */ if (ratio > 0.0f && ratio < 0.5f && decimal_places == 0) diff --git a/gcc/genmatch.cc b/gcc/genmatch.cc index 4020bec73c41430c4eead48ba39ecd91118a7e2f..6287d6a7bc2ef9daea24c9d20065f65cc7563561 100644 --- a/gcc/genmatch.cc +++ b/gcc/genmatch.cc @@ -6115,8 +6115,8 @@ main (int argc, char **argv) if (!cpp_read_main_file (r, input)) return 1; - cpp_define (r, gimple ? "GIMPLE=1": "GENERIC=1"); - cpp_define (r, gimple ? "GENERIC=0": "GIMPLE=0"); + cpp_define (r, gimple ? "GIMPLE=1" : "GENERIC=1"); + cpp_define (r, gimple ? "GENERIC=0" : "GIMPLE=0"); null_id = new id_base (id_base::NULL_ID, "null"); diff --git a/gcc/incpath.cc b/gcc/incpath.cc index 0193ccfe30fe79e9193d12c0b874d926f46a8d4a..63ad664208d241dcd33659e05580982b3c1cd1a9 100644 --- a/gcc/incpath.cc +++ b/gcc/incpath.cc @@ -313,7 +313,7 @@ remove_duplicates (cpp_reader *pfile, struct cpp_dir *head, /* Remove this entry from the chain. */ *pcur = cur->next; - free_path (cur, verbose ? reason: REASON_QUIET); + free_path (cur, verbose ? reason : REASON_QUIET); } *pcur = join; @@ -495,7 +495,7 @@ register_include_chains (cpp_reader *pfile, const char *sysroot, { "C_INCLUDE_PATH", "CPLUS_INCLUDE_PATH", "OBJC_INCLUDE_PATH", "OBJCPLUS_INCLUDE_PATH" }; cpp_options *cpp_opts = cpp_get_options (pfile); - size_t idx = (cpp_opts->objc ? 2: 0); + size_t idx = (cpp_opts->objc ? 2 : 0); if (cpp_opts->cplusplus) idx++; diff --git a/gcc/ipa-devirt.cc b/gcc/ipa-devirt.cc index a7ce434bffb475e9b31e4be1c8d55a5c6476cdfb..c406e5138db6e4b43e5a4a3f861e1d15a8790000 100644 --- a/gcc/ipa-devirt.cc +++ b/gcc/ipa-devirt.cc @@ -2146,8 +2146,8 @@ dump_odr_type (FILE *f, odr_type t, int indent=0) unsigned int i; fprintf (f, "%*s type %i: ", indent * 2, "", t->id); print_generic_expr (f, t->type, TDF_SLIM); - fprintf (f, "%s", t->anonymous_namespace ? " (anonymous namespace)":""); - fprintf (f, "%s\n", t->all_derivations_known ? " (derivations known)":""); + fprintf (f, "%s", t->anonymous_namespace ? " (anonymous namespace)" : ""); + fprintf (f, "%s\n", t->all_derivations_known ? " (derivations known)" : ""); if (TYPE_NAME (t->type)) { if (DECL_ASSEMBLER_NAME_SET_P (TYPE_NAME (t->type))) diff --git a/gcc/ipa-icf.cc b/gcc/ipa-icf.cc index 6f9941522c8fa1a73b4ae0603a9ff1b529ee6e57..b10a6baf1097fe02c115fc625e3bc32d966ac5bc 100644 --- a/gcc/ipa-icf.cc +++ b/gcc/ipa-icf.cc @@ -3410,7 +3410,7 @@ sem_item_optimizer::merge_classes (unsigned int prev_class_count, unsigned total = equal_items + non_singular_classes_count; fprintf (dump_file, "Totally needed symbols: %u" ", fraction of loaded symbols: %.2f%%\n\n", total, - loaded_symbols ? 100.0f * total / loaded_symbols: 0.0f); + loaded_symbols ? 100.0f * total / loaded_symbols : 0.0f); } unsigned int l; diff --git a/gcc/ipa-inline.cc b/gcc/ipa-inline.cc index 9fc41b7696d8a6603c6631c80b36b3283b7ec708..f15e141aa527c6a3da0f292982bc8c8d860804ce 100644 --- a/gcc/ipa-inline.cc +++ b/gcc/ipa-inline.cc @@ -2447,7 +2447,8 @@ inline_small_functions (void) s->time.to_double (), ipa_size_summaries->get (edge->caller)->size, buf_net_change, - cross_module_call_p (edge) ? " (cross module)":""); + cross_module_call_p (edge) + ? " (cross module)" : ""); } if (min_size > overall_size) { @@ -2463,7 +2464,7 @@ inline_small_functions (void) dump_printf (MSG_NOTE, "Unit growth for small function inlining: %i->%i (%i%%)\n", initial_size, overall_size, - initial_size ? overall_size * 100 / (initial_size) - 100: 0); + initial_size ? overall_size * 100 / (initial_size) - 100 : 0); symtab->remove_edge_removal_hook (edge_removal_hook_holder); } diff --git a/gcc/ipa-polymorphic-call.cc b/gcc/ipa-polymorphic-call.cc index 81de6d7fc33aa1dea013d76e5e0ddf7bd8b20c35..7d3df7c474cce594f63e8e2799bdaaba3d6e3d6c 100644 --- a/gcc/ipa-polymorphic-call.cc +++ b/gcc/ipa-polymorphic-call.cc @@ -624,7 +624,7 @@ ipa_polymorphic_call_context::dump (FILE *f, bool newline) const fprintf (f, "nothing known"); if (outer_type || offset) { - fprintf (f, "Outer type%s:", dynamic ? " (dynamic)":""); + fprintf (f, "Outer type%s:", dynamic ? " (dynamic)" : ""); print_generic_expr (f, outer_type, TDF_SLIM); if (maybe_derived_type) fprintf (f, " (or a derived type)"); diff --git a/gcc/ipa-sra.cc b/gcc/ipa-sra.cc index 6d6da408925161705508d46e1ba163a9ba956c41..04920f2aa8e44eb24b5160a079e40ff3d0c2ac9c 100644 --- a/gcc/ipa-sra.cc +++ b/gcc/ipa-sra.cc @@ -1256,7 +1256,7 @@ create_parameter_descriptors (cgraph_node *node, fprintf (dump_file, " is a scalar with only %i call uses%s\n", desc->call_uses, desc->remove_only_when_retval_removed - ? " and return uses": ""); + ? " and return uses" : ""); } if (POINTER_TYPE_P (type)) diff --git a/gcc/ipa-utils.cc b/gcc/ipa-utils.cc index dbfc60ff8acbd04b1925cecf6d4ef95731b8dba6..2366fa778d159ab6f553ef2898d6aea4b3ce3a39 100644 --- a/gcc/ipa-utils.cc +++ b/gcc/ipa-utils.cc @@ -1012,11 +1012,16 @@ find_always_executed_bbs (function *fun, bool assume_return_or_eh) cstate->low = MIN (cstate->low, (*cstate2)->low); cstate->high = MAX (cstate->high, (*cstate2)->high); } - if (dump_file && (dump_flags & TDF_DETAILS) && bb != EXIT_BLOCK_PTR_FOR_FN (fun)) - fprintf (dump_file, "BB %i %s preorder %i posorder %i low %i high %i\n", - bb->index, terminating_bbs_set.contains (bb) ? "(terminating)": "", - cstate->dfs_preorder, cstate->dfs_postorder, cstate->low, cstate->high); - if (cstate->low == cstate->dfs_preorder && cstate->high == cstate->dfs_postorder + if (dump_file && (dump_flags & TDF_DETAILS) + && bb != EXIT_BLOCK_PTR_FOR_FN (fun)) + fprintf (dump_file, + "BB %i %s preorder %i posorder %i low %i high %i\n", + bb->index, + terminating_bbs_set.contains (bb) ? "(terminating)" : "", + cstate->dfs_preorder, cstate->dfs_postorder, cstate->low, + cstate->high); + if (cstate->low == cstate->dfs_preorder + && cstate->high == cstate->dfs_postorder && bb != EXIT_BLOCK_PTR_FOR_FN (fun)) bitmap_set_bit (ret, bb->index); if (terminating_bbs_set.contains (bb)) @@ -1035,7 +1040,7 @@ find_always_executed_bbs (function *fun, bool assume_return_or_eh) if (dump_file) { fprintf (dump_file, "Always executed bbbs %s: ", - assume_return_or_eh ? "(assuming return or EH)": ""); + assume_return_or_eh ? "(assuming return or EH)" : ""); bitmap_print (dump_file, ret, "", "\n"); } diff --git a/gcc/predict.cc b/gcc/predict.cc index affa037371ca94582a2adb2472795eaeffeaa316..87b34597662cb80cb78c82e9c7fc919d2a1b11bc 100644 --- a/gcc/predict.cc +++ b/gcc/predict.cc @@ -1989,7 +1989,7 @@ predict_loops (void) if (dump_file && (dump_flags & TDF_DETAILS)) fprintf (dump_file, "Predicting loop %i%s with %i exits.\n", - loop->num, recursion ? " (with recursion)":"", n_exits); + loop->num, recursion ? " (with recursion)" : "", n_exits); if (dump_file && (dump_flags & TDF_DETAILS) && max_loop_iterations_int (loop) >= 0) { diff --git a/gcc/selftest.cc b/gcc/selftest.cc index 6438d86a6aa00298000b05a35b5b42f726e99394..15284c3359c4be8cc25ace3d343ec0525255001c 100644 --- a/gcc/selftest.cc +++ b/gcc/selftest.cc @@ -257,7 +257,7 @@ read_file (const location &loc, const char *path) /* Allow 1 extra byte for 0-termination. */ if (alloc_sz < (total_sz + 1)) { - size_t new_alloc_sz = alloc_sz ? alloc_sz * 2: total_sz + 1; + size_t new_alloc_sz = alloc_sz ? alloc_sz * 2 : total_sz + 1; result = (char *)xrealloc (result, new_alloc_sz); alloc_sz = new_alloc_sz; } diff --git a/gcc/sreal.h b/gcc/sreal.h index 8104510a59e54539d01c66ad59c5ad07b7684962..ee9811d6c55905231d708df57de2765f70a4e15a 100644 --- a/gcc/sreal.h +++ b/gcc/sreal.h @@ -30,8 +30,8 @@ along with GCC; see the file COPYING3. If not see #define SREAL_BITS SREAL_PART_BITS -#define SREAL_SIGN(v) (v < 0 ? -1: 1) -#define SREAL_ABS(v) (v < 0 ? -v: v) +#define SREAL_SIGN(v) (v < 0 ? -1 : 1) +#define SREAL_ABS(v) (v < 0 ? -v : v) struct output_block; class lto_input_block; diff --git a/gcc/tree-dump.cc b/gcc/tree-dump.cc index 3b5864eecb67742c006e2cece1d8db8340cb6d14..ba3cf1a2fe3b95e1c8eb18db7a39cc1971df9c1d 100644 --- a/gcc/tree-dump.cc +++ b/gcc/tree-dump.cc @@ -442,7 +442,8 @@ dequeue_and_dump (dump_info_p di) case INTEGER_TYPE: case ENUMERAL_TYPE: dump_int (di, "prec", TYPE_PRECISION (t)); - dump_string_field (di, "sign", TYPE_UNSIGNED (t) ? "unsigned": "signed"); + dump_string_field (di, "sign", + TYPE_UNSIGNED (t) ? "unsigned" : "signed"); dump_child ("min", TYPE_MIN_VALUE (t)); dump_child ("max", TYPE_MAX_VALUE (t)); @@ -456,9 +457,11 @@ dequeue_and_dump (dump_info_p di) case FIXED_POINT_TYPE: dump_int (di, "prec", TYPE_PRECISION (t)); - dump_string_field (di, "sign", TYPE_UNSIGNED (t) ? "unsigned": "signed"); + dump_string_field (di, "sign", + TYPE_UNSIGNED (t) ? "unsigned" : "signed"); dump_string_field (di, "saturating", - TYPE_SATURATING (t) ? "saturating": "non-saturating"); + TYPE_SATURATING (t) + ? "saturating" : "non-saturating"); break; case POINTER_TYPE: diff --git a/gcc/tree-ssa-ccp.cc b/gcc/tree-ssa-ccp.cc index a5f6ef5f5ddd12a6181d714d4ff12720206e2dca..db1287228239996b39e8cec36c28021574b4e2cb 100644 --- a/gcc/tree-ssa-ccp.cc +++ b/gcc/tree-ssa-ccp.cc @@ -1848,7 +1848,7 @@ bit_value_binop (enum tree_code code, signop sgn, int width, /* Do a cross comparison of the max/min pairs. */ maxmin = wi::cmp (max1, min2, r1type_sgn); minmax = wi::cmp (min1, max2, r1type_sgn); - if (maxmin < (code == LE_EXPR ? 1: 0)) /* o1 < or <= o2. */ + if (maxmin < (code == LE_EXPR ? 1 : 0)) /* o1 < or <= o2. */ { *mask = 0; *val = 1; diff --git a/libcpp/expr.cc b/libcpp/expr.cc index b7772c9bd6c6d09dd3e684515e3d8e7bd000b1f2..67d021f898a962649ae7e0cf933dc65a1a70f244 100644 --- a/libcpp/expr.cc +++ b/libcpp/expr.cc @@ -141,9 +141,9 @@ interpret_float_suffix (cpp_reader *pfile, const uchar *s, size_t len) bool uppercase = (*s == 'D'); switch (s[1]) { - case 'f': return (!uppercase ? (CPP_N_DFLOAT | CPP_N_SMALL): 0); break; + case 'f': return (!uppercase ? (CPP_N_DFLOAT | CPP_N_SMALL) : 0); break; case 'F': return (uppercase ? (CPP_N_DFLOAT | CPP_N_SMALL) : 0); break; - case 'd': return (!uppercase ? (CPP_N_DFLOAT | CPP_N_MEDIUM): 0); break; + case 'd': return (!uppercase ? (CPP_N_DFLOAT | CPP_N_MEDIUM) : 0); break; case 'D': return (uppercase ? (CPP_N_DFLOAT | CPP_N_MEDIUM) : 0); break; case 'l': return (!uppercase ? (CPP_N_DFLOAT | CPP_N_LARGE) : 0); break; case 'L': return (uppercase ? (CPP_N_DFLOAT | CPP_N_LARGE) : 0); break;