OSDN Git Service

2005-10-28 Andrew Pinski <pinskia@physics.uc.edu>
authorpinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 28 Oct 2005 20:59:05 +0000 (20:59 +0000)
committerpinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 28 Oct 2005 20:59:05 +0000 (20:59 +0000)
        * decl.c (grokfndecl): Remove the setting
        of the return type of the function type
        of main after erroring about must returning
        int.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@105963 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/cp/ChangeLog
gcc/cp/decl.c

index 81da122..8776b1f 100644 (file)
@@ -1,5 +1,12 @@
 2005-10-28  Andrew Pinski  <pinskia@physics.uc.edu>
 
+       * decl.c (grokfndecl): Remove the setting
+       of the return type of the function type
+       of main after erroring about must returning
+       int.
+
+2005-10-28  Andrew Pinski  <pinskia@physics.uc.edu>
+
        PR C++/23229
        * decl.c (grokfndecl): Create a new function type
        after erroring out about main not returning int.
index 07278ff..7e38ec3 100644 (file)
@@ -5722,7 +5722,6 @@ grokfndecl (tree ctype,
          newtype =  build_function_type (integer_type_node,
                                          oldtypeargs);
          TREE_TYPE (decl) = newtype;
-         TREE_TYPE (TREE_TYPE (decl)) = integer_type_node;
        }
       inlinep = 0;
       publicp = 1;