c-common.c (handle_noreturn_attribute): Use TYPE_READONLY instead of TREE_READONLY...
authorAndrew Pinski <pinskia@physics.uc.edu>
Fri, 9 Apr 2004 20:08:03 +0000 (20:08 +0000)
committerAndrew Pinski <pinskia@gcc.gnu.org>
Fri, 9 Apr 2004 20:08:03 +0000 (13:08 -0700)
2004-04-09  Andrew Pinski  <pinskia@physics.uc.edu>

        * c-common.c (handle_noreturn_attribute): Use TYPE_READONLY instead
        of TREE_READONLY for types.
2004-04-09  Andrew Pinski  <pinskia@physics.uc.edu>

        * gcc.dg/20040409-1.c: New test.

From-SVN: r80565

gcc/ChangeLog
gcc/c-common.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/20040409-1.c [new file with mode: 0644]

index abbb5b63161fa4e956eb6601539d859c47a5f689..bebfffa682fc100fe8ad2135f75a6b315d6e8a5f 100644 (file)
@@ -1,3 +1,8 @@
+2004-04-09  Andrew Pinski  <pinskia@physics.uc.edu>
+
+       * c-common.c (handle_noreturn_attribute): Use TYPE_READONLY instead
+       of TREE_READONLY for types.
+
 2004-04-09  Caroline Tice  <ctice@apple.com>
 
         * basic-block.h (struct edge_def):  Add new field, crossing_edge.
index a3904cac7c060d0fdde63399e5894e933e154be4..9c868291e098b5a5d1c9c1f26e4ad1e469360501 100644 (file)
@@ -4315,7 +4315,7 @@ handle_noreturn_attribute (tree *node, tree name, tree args ATTRIBUTE_UNUSED,
     TREE_TYPE (*node)
       = build_pointer_type
        (build_type_variant (TREE_TYPE (type),
-                            TREE_READONLY (TREE_TYPE (type)), 1));
+                            TYPE_READONLY (TREE_TYPE (type)), 1));
   else
     {
       warning ("`%s' attribute ignored", IDENTIFIER_POINTER (name));
index 272ad84b843f52cf08320cd06f4482ede3d312fc..1161a0dcb212be43753efbc28f6bc68c7b012613 100644 (file)
@@ -1,3 +1,7 @@
+2004-04-09  Andrew Pinski  <pinskia@physics.uc.edu>
+
+       * gcc.dg/20040409-1.c: New test.
+
 2004-04-08  Roger Sayle  <roger@eyesopen.com>
 
        PR target/14888
diff --git a/gcc/testsuite/gcc.dg/20040409-1.c b/gcc/testsuite/gcc.dg/20040409-1.c
new file mode 100644 (file)
index 0000000..dc9206a
--- /dev/null
@@ -0,0 +1,4 @@
+/* This tests to make sure that the attribute noreturn 
+   can be used on function pointers. */
+
+int (*temp) (void) __attribute__((noreturn));