]> gcc.gnu.org Git - gcc.git/commitdiff
fp-bit.c (abort): Add noreturn attribute.
authorNathan Sidwell <nathan@codesourcery.com>
Wed, 27 Apr 2005 17:02:34 +0000 (17:02 +0000)
committerNathan Sidwell <nathan@gcc.gnu.org>
Wed, 27 Apr 2005 17:02:34 +0000 (17:02 +0000)
* config/fp-bit.c (abort): Add noreturn attribute.

* config/avr/avr.c (avr_naked_function_p): Use gcc_assert and
gcc_unreachable as appropriate.
(ptrreg_to_str, cond_string, avr_normalize_condition): Likewise.
* config/avr/avr.h (ASM_OUTPUT_REG_PUSH,
ASM_OUTPUT_REG_POP): Likewise.

From-SVN: r98854

gcc/ChangeLog
gcc/config/avr/avr.c
gcc/config/avr/avr.h
gcc/config/fp-bit.c

index 2f0dfcb6d9af2faf1d0952f6ed9d807f80ee4247..a7ef1e3d3485d7d3f8aa7a67f2a3915ff7052b2b 100644 (file)
@@ -1,3 +1,13 @@
+2005-04-27  Nathan Sidwell  <nathan@codesourcery.com>
+
+       * config/fp-bit.c (abort): Add noreturn attribute.
+
+       * config/avr/avr.c (avr_naked_function_p): Use gcc_assert and
+       gcc_unreachable as appropriate.
+       (ptrreg_to_str, cond_string, avr_normalize_condition): Likewise.
+       * config/avr/avr.h (ASM_OUTPUT_REG_PUSH,
+       ASM_OUTPUT_REG_POP): Likewise.
+
 2005-04-27  Paolo Bonzini  <bonzini@gnu.org>
 
        * tree-complex.c (expand_vector_operations_1): Do not build
index bc51d9181c20d55069ee1a04b4f0e9e4483441b5..668d4cc6a2b3124fc8b2c17edafe0594834872fa 100644 (file)
@@ -380,8 +380,7 @@ avr_naked_function_p (tree func)
 {
   tree a;
 
-  if (TREE_CODE (func) != FUNCTION_DECL)
-    abort ();
+  gcc_assert (TREE_CODE (func) == FUNCTION_DECL);
   
   a = lookup_attribute ("naked", DECL_ATTRIBUTES (func));
   return a != NULL_TREE;
@@ -1030,7 +1029,7 @@ ptrreg_to_str (int regno)
     case REG_Y: return "Y";
     case REG_Z: return "Z";
     default:
-      abort ();
+      gcc_unreachable ();
     }
   return NULL;
 }
@@ -1062,7 +1061,7 @@ cond_string (enum rtx_code code)
     case LTU:
       return "lo";
     default:
-      abort ();
+      gcc_unreachable ();
     }
 }
 
@@ -5534,7 +5533,7 @@ avr_normalize_condition (RTX_CODE condition)
     case LEU:
       return LTU;
     default:
-      abort ();
+      gcc_unreachable ();
     }
 }
 
index e0a9c75dcad44db824faf9d6ec20b9da6b98bf94..5b7c73dfac6932ae62a98623e00bca87936b8b65 100644 (file)
@@ -668,15 +668,13 @@ sprintf (STRING, "*.%s%lu", PREFIX, (unsigned long)(NUM))
 
 #define ASM_OUTPUT_REG_PUSH(STREAM, REGNO)     \
 {                                              \
-  if (REGNO > 31)                              \
-    abort ();                                  \
+  gcc_assert (REGNO < 32);                     \
   fprintf (STREAM, "\tpush\tr%d", REGNO);      \
 }
 
 #define ASM_OUTPUT_REG_POP(STREAM, REGNO)      \
 {                                              \
-  if (REGNO > 31)                              \
-    abort ();                                  \
+  gcc_assert (REGNO < 32);                     \
   fprintf (STREAM, "\tpop\tr%d", REGNO);       \
 }
 
index 795e67ad36a91ec0de2e2bc861a9bd1f1aff3af8..1229bf7e6b8b2a2868a4d70028a45b0f3f0bea0b 100644 (file)
@@ -81,7 +81,7 @@ Boston, MA 02111-1307, USA.  */
 #endif
 
 #ifdef EXTENDED_FLOAT_STUBS
-extern void abort (void);
+extern __attribute__ ((__noreturn__)) void abort (void);
 void __extendsfxf2 (void) { abort(); }
 void __extenddfxf2 (void) { abort(); }
 void __truncxfdf2 (void) { abort(); }
This page took 0.087567 seconds and 5 git commands to generate.