c-decl.c (duplicate_decls): Preserve the noreturn attribute on non-ANSI builtin funct...
authorRoger Sayle <roger@eyesopen.com>
Thu, 11 Jul 2002 12:29:07 +0000 (12:29 +0000)
committerRoger Sayle <sayle@gcc.gnu.org>
Thu, 11 Jul 2002 12:29:07 +0000 (12:29 +0000)
* c-decl.c (duplicate_decls): Preserve the noreturn attribute on
non-ANSI builtin functions.

* gcc.c-torture/execute/builtin-noret-1.c: Test non-ANSI functions.

From-SVN: r55396

gcc/ChangeLog
gcc/c-decl.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/execute/builtin-noret-1.c

index 11314a1f7f0a95c6d178944d93e30f674426efde..4bd40857b37f7b6699dfbacc9ea974565a4f4306 100644 (file)
@@ -1,3 +1,8 @@
+2002-07-11  Roger Sayle  <roger@eyesopen.com>
+
+       * c-decl.c (duplicate_decls): Preserve the noreturn attribute on
+       non-ANSI builtin functions.
+
 Thu Jul 11 11:31:12 2002  J"orn Rennecke <joern.rennecke@superh.com>
 
        * rtl.h (gen_rtx_CONST_VECTOR): Declare.
index a32b7835ca1c0ab9280a6c98601c68d48d3e6c5f..8551ba55dc4b1e2a6c499837bcf2b83b56ed4199 100644 (file)
@@ -1764,11 +1764,6 @@ duplicate_decls (newdecl, olddecl, different_binding_level)
       COPY_DECL_RTL (olddecl, newdecl);
 
       /* Merge the type qualifiers.  */
-      if (TREE_CODE (olddecl) == FUNCTION_DECL
-         && DECL_BUILT_IN_NONANSI (olddecl) && TREE_THIS_VOLATILE (olddecl)
-         && ! TREE_THIS_VOLATILE (newdecl))
-       TREE_THIS_VOLATILE (write_olddecl) = 0;
-
       if (TREE_READONLY (newdecl))
        TREE_READONLY (write_olddecl) = 1;
 
index f2800854a96c7195efe1c32b26016193199a5907..11cb55e0f32d992887c12fac94d3d4f4960bfdec 100644 (file)
@@ -1,3 +1,7 @@
+2002-07-11  Roger Sayle  <roger@eyesopen.com>
+
+       * gcc.c-torture/execute/builtin-noret-1.c: Test non-ANSI functions.
+
 2002-07-10  Roger Sayle  <roger@eyesopen.com>
 
        * gcc.c-torture/execute/20000217-1.c: Fix usage of "abort".
index cfd78991214ee6bc90bc0b958d80a777f6a68f49..9cd3e84614b729b945f432e52cbd9eddc142adb9 100644 (file)
@@ -3,10 +3,8 @@
 
 extern void abort (void);
 extern void exit (int);
-#if 0 /* Doesn't work with prototype (bug?).  */
 extern void _exit (int);
 extern void _Exit (int);
-#endif
 
 extern void tabort (void);
 extern void texit (void);