]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - gcc/genconditions.cc
Update copyright years.
[thirdparty/gcc.git] / gcc / genconditions.cc
index 93739d46937ccc37aed0732ba767de9cbb9a462a..13963dc3ff46aa250c39ce80d0b92356390e41ff 100644 (file)
@@ -1,5 +1,5 @@
 /* Process machine description and calculate constant conditions.
-   Copyright (C) 2001-2022 Free Software Foundation, Inc.
+   Copyright (C) 2001-2024 Free Software Foundation, Inc.
 
    This file is part of GCC.
 
@@ -149,7 +149,7 @@ write_one_condition (void **slot, void * ARG_UNUSED (dummy))
 }
 
 /* Write out the complete conditions table, its size, and a flag
-   indicating that gensupport.c can now do insn elision.  */
+   indicating that gensupport.cc can now do insn elision.  */
 static void
 write_conditions (void)
 {
@@ -175,7 +175,7 @@ static const struct c_test insn_conditions[] = {\n");
 
   traverse_c_tests (write_one_condition, 0);
 
-  puts ("\n};\n#endif /* gcc >= 3.0.1 */\n");
+  puts ("  { nullptr, -1 }\n};\n#endif /* gcc >= 3.0.1 */\n");
 }
 
 /* Emit code which will convert the C-format table to a
@@ -192,7 +192,7 @@ write_writer (void)
         "  const char *p;\n"
         "  puts (\"(define_conditions [\");\n"
        "#if GCC_VERSION >= 3001\n"
-       "  for (i = 0; i < ARRAY_SIZE (insn_conditions); i++)\n"
+       "  for (i = 0; i < ARRAY_SIZE (insn_conditions) - 1; i++)\n"
        "    {\n"
        "      printf (\"  (%d \\\"\", insn_conditions[i].value);\n"
        "      for (p = insn_conditions[i].expr; *p; p++)\n"