OSDN Git Service

PR c/10175
[pf3gnuchains/gcc-fork.git] / gcc / f / ansify.c
index 2e2615c..84efb96 100644 (file)
@@ -1,6 +1,6 @@
 /* ansify.c
    Copyright (C) 1997 Free Software Foundation, Inc.
-   Contributed by James Craig Burley (burley@gnu.org).
+   Contributed by James Craig Burley.
 
 This file is part of GNU Fortran.
 
@@ -19,39 +19,21 @@ along with GNU Fortran; see the file COPYING.  If not, write to
 the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
 02111-1307, USA.  */
 
-/* From f/proj.h, which uses #error -- not all C compilers
-   support that, and we want *this* program to be compilable
-   by pretty much any C compiler.  */
-
-#include "assert.j"            /* Use gcc's assert.h. */
-#include <stdio.h>
-#include <stddef.h>
-#include <stdlib.h>
-#include <string.h>
-
-typedef enum
-  {
-#if !defined(false) || !defined(true)
-    false = 0, true = 1,
-#endif
-#if !defined(FALSE) || !defined(TRUE)
-    FALSE = 0, TRUE = 1,
-#endif
-    Doggone_Trailing_Comma_Dont_Work = 1
-  } bool;
-
-#define ARRAY_SIZE(a) (sizeof(a)/sizeof(a[0]))
+#include "bconfig.h"
+#include "system.h"
+#include "coretypes.h"
+#include "tm.h"
 
 #define die_unless(c) \
   do if (!(c)) \
     { \
-      fprintf (stderr, "%s:%lu: " #c "\n", argv[1], lineno); \
+      fprintf (stderr, "%s:%lu: %s\n", argv[1], lineno, #c); \
       die (); \
     } \
   while(0)
 
-static void
-die ()
+static void ATTRIBUTE_NORETURN
+die (void)
 {
   exit (1);
 }
@@ -67,7 +49,7 @@ main(int argc, char **argv)
   printf ("\
 /* This file is automatically generated from `%s',\n\
    which you should modify instead.  */\n\
-# 1 \"%s\"\n\
+#line 1 \"%s\"\n\
 ",
          argv[1], argv[1]);