diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog
index 54a80e4fc536cb6e1fdd20ef15f29f5b247c03b1..ba91e8a70a4bc969137ad002f7d5dc81a021ca2c 100644
--- a/libgfortran/ChangeLog
+++ b/libgfortran/ChangeLog
@@ -1,5 +1,41 @@
 2005-05-15  Andreas Jaeger  <aj@suse.de>
 
+	* runtime/normalize.c (almostone_r4, almostone_r8): Fix parameter
+	list.
+
+	* intrinsics/random.c (KISS_DEFAULT_SEED): Remove extra semicolon.
+
+	* io/transfer.c: Do not use empty initializers for global objects.
+	Add missing initializers.
+
+	* io/lock.c: Do not use empty initializers for global objects.
+
+	* io/close.c: Add missing initializers.
+
+	* runtime/environ.c: Add missing initializers. Do not use empty
+	initializers for global object.
+	(init_string): Mark argument as unused.
+
+	* runtime/main.c (cleanup): Fix parameter list.
+
+	* io/io.h: Fix parameter lists.
+
+	* m4/transpose.m4, m4/matmul.m4: Fix pointer cast to avoid
+	warning.
+
+	* generated/transpose_c4.c, generated/transpose_c8.c,
+	generated/transpose_i4.c, generated/transpose_i8.c,
+	generated/matmul_c4.c, generated/matmul_c8.c,
+	generated/matmul_i4.c, generated/matmul_i8.c,
+	generated/matmul_r4.c, generated/matmul_r8.c: Regenerated.
+
+	* io/write.c (nml_write_obj): Fix 64-bit problem.
+
+	* io/list_read.c (nml_get_obj_data): Add missing braces around
+	initializer to avoid warnings.
+
+	* intrinsics/etime.c (etime_sub): Remove unused variable.
+
 	* intrinsics/chdir.c, intrinsics/getlog.c, intrinsics/link.c,
 	intrinsics/symlnk.c, intrinsics/perror.c: Include <string.h> for
 	prototypes.
diff --git a/libgfortran/generated/matmul_c4.c b/libgfortran/generated/matmul_c4.c
index 8c5235049ec0fc5b95a41600ad6692465fcaf4f2..40930a15bb2fb554c5fa948469d64f817927fb90 100644
--- a/libgfortran/generated/matmul_c4.c
+++ b/libgfortran/generated/matmul_c4.c
@@ -1,5 +1,5 @@
 /* Implementation of the MATMUL intrinsic
-   Copyright 2002 Free Software Foundation, Inc.
+   Copyright 2002, 2005 Free Software Foundation, Inc.
    Contributed by Paul Brook <paul@nowt.org>
 
 This file is part of the GNU Fortran 95 runtime library (libgfortran).
@@ -99,7 +99,7 @@ matmul_c4 (gfc_array_c4 * retarray, gfc_array_c4 * a, gfc_array_c4 * b)
         }
           
       retarray->data
-	= internal_malloc_size (sizeof (GFC_COMPLEX_4) * size0 (retarray));
+	= internal_malloc_size (sizeof (GFC_COMPLEX_4) * size0 ((array_t *) retarray));
       retarray->base = 0;
     }
 
@@ -178,7 +178,7 @@ matmul_c4 (gfc_array_c4 * retarray, gfc_array_c4 * a, gfc_array_c4 * b)
       GFC_COMPLEX_4 *abase_n;
       GFC_COMPLEX_4 bbase_yn;
 
-      memset (dest, 0, (sizeof (GFC_COMPLEX_4) * size0(retarray)));
+      memset (dest, 0, (sizeof (GFC_COMPLEX_4) * size0((array_t *) retarray)));
 
       for (y = 0; y < ycount; y++)
 	{
diff --git a/libgfortran/generated/matmul_c8.c b/libgfortran/generated/matmul_c8.c
index d70f58233d8ce1757d515e843f39371aa268809d..07b5e967dd524e6308bac7cb9b43c20a7e581302 100644
--- a/libgfortran/generated/matmul_c8.c
+++ b/libgfortran/generated/matmul_c8.c
@@ -1,5 +1,5 @@
 /* Implementation of the MATMUL intrinsic
-   Copyright 2002 Free Software Foundation, Inc.
+   Copyright 2002, 2005 Free Software Foundation, Inc.
    Contributed by Paul Brook <paul@nowt.org>
 
 This file is part of the GNU Fortran 95 runtime library (libgfortran).
@@ -99,7 +99,7 @@ matmul_c8 (gfc_array_c8 * retarray, gfc_array_c8 * a, gfc_array_c8 * b)
         }
           
       retarray->data
-	= internal_malloc_size (sizeof (GFC_COMPLEX_8) * size0 (retarray));
+	= internal_malloc_size (sizeof (GFC_COMPLEX_8) * size0 ((array_t *) retarray));
       retarray->base = 0;
     }
 
@@ -178,7 +178,7 @@ matmul_c8 (gfc_array_c8 * retarray, gfc_array_c8 * a, gfc_array_c8 * b)
       GFC_COMPLEX_8 *abase_n;
       GFC_COMPLEX_8 bbase_yn;
 
-      memset (dest, 0, (sizeof (GFC_COMPLEX_8) * size0(retarray)));
+      memset (dest, 0, (sizeof (GFC_COMPLEX_8) * size0((array_t *) retarray)));
 
       for (y = 0; y < ycount; y++)
 	{
diff --git a/libgfortran/generated/matmul_i4.c b/libgfortran/generated/matmul_i4.c
index 36835207df6863a285d82225e766bf283000639f..003163eb8e23af0e520b123ad562ee9dad18a836 100644
--- a/libgfortran/generated/matmul_i4.c
+++ b/libgfortran/generated/matmul_i4.c
@@ -1,5 +1,5 @@
 /* Implementation of the MATMUL intrinsic
-   Copyright 2002 Free Software Foundation, Inc.
+   Copyright 2002, 2005 Free Software Foundation, Inc.
    Contributed by Paul Brook <paul@nowt.org>
 
 This file is part of the GNU Fortran 95 runtime library (libgfortran).
@@ -99,7 +99,7 @@ matmul_i4 (gfc_array_i4 * retarray, gfc_array_i4 * a, gfc_array_i4 * b)
         }
           
       retarray->data
-	= internal_malloc_size (sizeof (GFC_INTEGER_4) * size0 (retarray));
+	= internal_malloc_size (sizeof (GFC_INTEGER_4) * size0 ((array_t *) retarray));
       retarray->base = 0;
     }
 
@@ -178,7 +178,7 @@ matmul_i4 (gfc_array_i4 * retarray, gfc_array_i4 * a, gfc_array_i4 * b)
       GFC_INTEGER_4 *abase_n;
       GFC_INTEGER_4 bbase_yn;
 
-      memset (dest, 0, (sizeof (GFC_INTEGER_4) * size0(retarray)));
+      memset (dest, 0, (sizeof (GFC_INTEGER_4) * size0((array_t *) retarray)));
 
       for (y = 0; y < ycount; y++)
 	{
diff --git a/libgfortran/generated/matmul_i8.c b/libgfortran/generated/matmul_i8.c
index 4d28c0f1beae31649375fc9d393aec5b73c56410..f88363fb117f198b198222ea77316f9ac3ee495c 100644
--- a/libgfortran/generated/matmul_i8.c
+++ b/libgfortran/generated/matmul_i8.c
@@ -1,5 +1,5 @@
 /* Implementation of the MATMUL intrinsic
-   Copyright 2002 Free Software Foundation, Inc.
+   Copyright 2002, 2005 Free Software Foundation, Inc.
    Contributed by Paul Brook <paul@nowt.org>
 
 This file is part of the GNU Fortran 95 runtime library (libgfortran).
@@ -99,7 +99,7 @@ matmul_i8 (gfc_array_i8 * retarray, gfc_array_i8 * a, gfc_array_i8 * b)
         }
           
       retarray->data
-	= internal_malloc_size (sizeof (GFC_INTEGER_8) * size0 (retarray));
+	= internal_malloc_size (sizeof (GFC_INTEGER_8) * size0 ((array_t *) retarray));
       retarray->base = 0;
     }
 
@@ -178,7 +178,7 @@ matmul_i8 (gfc_array_i8 * retarray, gfc_array_i8 * a, gfc_array_i8 * b)
       GFC_INTEGER_8 *abase_n;
       GFC_INTEGER_8 bbase_yn;
 
-      memset (dest, 0, (sizeof (GFC_INTEGER_8) * size0(retarray)));
+      memset (dest, 0, (sizeof (GFC_INTEGER_8) * size0((array_t *) retarray)));
 
       for (y = 0; y < ycount; y++)
 	{
diff --git a/libgfortran/generated/matmul_l4.c b/libgfortran/generated/matmul_l4.c
index 92baa55735de905312c24f287fc243b92540ad7c..f9b5cb41954ceb8db03cb1f3c0f33331bbf849d6 100644
--- a/libgfortran/generated/matmul_l4.c
+++ b/libgfortran/generated/matmul_l4.c
@@ -1,5 +1,5 @@
 /* Implementation of the MATMUL intrinsic
-   Copyright 2002 Free Software Foundation, Inc.
+   Copyright 2002, 2005 Free Software Foundation, Inc.
    Contributed by Paul Brook <paul@nowt.org>
 
 This file is part of the GNU Fortran 95 runtime library (libgfortran).
@@ -90,7 +90,7 @@ matmul_l4 (gfc_array_l4 * retarray, gfc_array_l4 * a, gfc_array_l4 * b)
         }
           
       retarray->data
-	= internal_malloc_size (sizeof (GFC_LOGICAL_4) * size0 (retarray));
+	= internal_malloc_size (sizeof (GFC_LOGICAL_4) * size0 ((array_t *) retarray));
       retarray->base = 0;
     }
 
@@ -99,14 +99,12 @@ matmul_l4 (gfc_array_l4 * retarray, gfc_array_l4 * a, gfc_array_l4 * b)
     {
       assert (GFC_DESCRIPTOR_SIZE (a) == 8);
       abase = GFOR_POINTER_L8_TO_L4 (abase);
-      astride <<= 1;
     }
   bbase = b->data;
   if (GFC_DESCRIPTOR_SIZE (b) != 4)
     {
       assert (GFC_DESCRIPTOR_SIZE (b) == 8);
       bbase = GFOR_POINTER_L8_TO_L4 (bbase);
-      bstride <<= 1;
     }
   dest = retarray->data;
 
diff --git a/libgfortran/generated/matmul_l8.c b/libgfortran/generated/matmul_l8.c
index 206097975e8ec76b5e7cb9200c423723a3e54a97..0f04e76f8437f53f73e10b13ece87f508f5334f8 100644
--- a/libgfortran/generated/matmul_l8.c
+++ b/libgfortran/generated/matmul_l8.c
@@ -1,5 +1,5 @@
 /* Implementation of the MATMUL intrinsic
-   Copyright 2002 Free Software Foundation, Inc.
+   Copyright 2002, 2005 Free Software Foundation, Inc.
    Contributed by Paul Brook <paul@nowt.org>
 
 This file is part of the GNU Fortran 95 runtime library (libgfortran).
@@ -90,7 +90,7 @@ matmul_l8 (gfc_array_l8 * retarray, gfc_array_l4 * a, gfc_array_l4 * b)
         }
           
       retarray->data
-	= internal_malloc_size (sizeof (GFC_LOGICAL_8) * size0 (retarray));
+	= internal_malloc_size (sizeof (GFC_LOGICAL_8) * size0 ((array_t *) retarray));
       retarray->base = 0;
     }
 
@@ -99,14 +99,12 @@ matmul_l8 (gfc_array_l8 * retarray, gfc_array_l4 * a, gfc_array_l4 * b)
     {
       assert (GFC_DESCRIPTOR_SIZE (a) == 8);
       abase = GFOR_POINTER_L8_TO_L4 (abase);
-      astride <<= 1;
     }
   bbase = b->data;
   if (GFC_DESCRIPTOR_SIZE (b) != 4)
     {
       assert (GFC_DESCRIPTOR_SIZE (b) == 8);
       bbase = GFOR_POINTER_L8_TO_L4 (bbase);
-      bstride <<= 1;
     }
   dest = retarray->data;
 
diff --git a/libgfortran/generated/matmul_r4.c b/libgfortran/generated/matmul_r4.c
index 9de46b55d96cb4ca1c2eaf794295adcf47ba99bd..7b84eb0d3f6abc70404f642c1d8c4e5d7e6f8e38 100644
--- a/libgfortran/generated/matmul_r4.c
+++ b/libgfortran/generated/matmul_r4.c
@@ -1,5 +1,5 @@
 /* Implementation of the MATMUL intrinsic
-   Copyright 2002 Free Software Foundation, Inc.
+   Copyright 2002, 2005 Free Software Foundation, Inc.
    Contributed by Paul Brook <paul@nowt.org>
 
 This file is part of the GNU Fortran 95 runtime library (libgfortran).
@@ -99,7 +99,7 @@ matmul_r4 (gfc_array_r4 * retarray, gfc_array_r4 * a, gfc_array_r4 * b)
         }
           
       retarray->data
-	= internal_malloc_size (sizeof (GFC_REAL_4) * size0 (retarray));
+	= internal_malloc_size (sizeof (GFC_REAL_4) * size0 ((array_t *) retarray));
       retarray->base = 0;
     }
 
@@ -178,7 +178,7 @@ matmul_r4 (gfc_array_r4 * retarray, gfc_array_r4 * a, gfc_array_r4 * b)
       GFC_REAL_4 *abase_n;
       GFC_REAL_4 bbase_yn;
 
-      memset (dest, 0, (sizeof (GFC_REAL_4) * size0(retarray)));
+      memset (dest, 0, (sizeof (GFC_REAL_4) * size0((array_t *) retarray)));
 
       for (y = 0; y < ycount; y++)
 	{
diff --git a/libgfortran/generated/matmul_r8.c b/libgfortran/generated/matmul_r8.c
index 888e9aaeba80f6882676880ac3ddfda102328cc0..f2a574bc0bb2be0f1ac74448cae419c5abb00ae3 100644
--- a/libgfortran/generated/matmul_r8.c
+++ b/libgfortran/generated/matmul_r8.c
@@ -1,5 +1,5 @@
 /* Implementation of the MATMUL intrinsic
-   Copyright 2002 Free Software Foundation, Inc.
+   Copyright 2002, 2005 Free Software Foundation, Inc.
    Contributed by Paul Brook <paul@nowt.org>
 
 This file is part of the GNU Fortran 95 runtime library (libgfortran).
@@ -99,7 +99,7 @@ matmul_r8 (gfc_array_r8 * retarray, gfc_array_r8 * a, gfc_array_r8 * b)
         }
           
       retarray->data
-	= internal_malloc_size (sizeof (GFC_REAL_8) * size0 (retarray));
+	= internal_malloc_size (sizeof (GFC_REAL_8) * size0 ((array_t *) retarray));
       retarray->base = 0;
     }
 
@@ -178,7 +178,7 @@ matmul_r8 (gfc_array_r8 * retarray, gfc_array_r8 * a, gfc_array_r8 * b)
       GFC_REAL_8 *abase_n;
       GFC_REAL_8 bbase_yn;
 
-      memset (dest, 0, (sizeof (GFC_REAL_8) * size0(retarray)));
+      memset (dest, 0, (sizeof (GFC_REAL_8) * size0((array_t *) retarray)));
 
       for (y = 0; y < ycount; y++)
 	{
diff --git a/libgfortran/generated/transpose_c4.c b/libgfortran/generated/transpose_c4.c
index c61d9072a81f56aa2fcc57d45af3e05611f1b651..76e6332730d5fdefe951d52a5c42bef7f6ebacc4 100644
--- a/libgfortran/generated/transpose_c4.c
+++ b/libgfortran/generated/transpose_c4.c
@@ -63,7 +63,7 @@ transpose_c4 (gfc_array_c4 * ret, gfc_array_c4 * source)
       ret->dim[1].ubound = source->dim[0].ubound - source->dim[0].lbound;
       ret->dim[1].stride = ret->dim[0].ubound+1;
 
-      ret->data = internal_malloc_size (sizeof (GFC_COMPLEX_4) * size0 (ret));
+      ret->data = internal_malloc_size (sizeof (GFC_COMPLEX_4) * size0 ((array_t *) ret));
       ret->base = 0;
     }
 
diff --git a/libgfortran/generated/transpose_c8.c b/libgfortran/generated/transpose_c8.c
index fd74f26f5da5ecff978840a415147e509a62758a..6e45b7606404ed2e6ca5dd2ef45da2fe2a280675 100644
--- a/libgfortran/generated/transpose_c8.c
+++ b/libgfortran/generated/transpose_c8.c
@@ -63,7 +63,7 @@ transpose_c8 (gfc_array_c8 * ret, gfc_array_c8 * source)
       ret->dim[1].ubound = source->dim[0].ubound - source->dim[0].lbound;
       ret->dim[1].stride = ret->dim[0].ubound+1;
 
-      ret->data = internal_malloc_size (sizeof (GFC_COMPLEX_8) * size0 (ret));
+      ret->data = internal_malloc_size (sizeof (GFC_COMPLEX_8) * size0 ((array_t *) ret));
       ret->base = 0;
     }
 
diff --git a/libgfortran/generated/transpose_i4.c b/libgfortran/generated/transpose_i4.c
index 0945d06512603018bb9935d543e54f62c3cbe91e..af5041e19b5d5000cc09fd1c13a6a9ddfbc5a8f5 100644
--- a/libgfortran/generated/transpose_i4.c
+++ b/libgfortran/generated/transpose_i4.c
@@ -63,7 +63,7 @@ transpose_i4 (gfc_array_i4 * ret, gfc_array_i4 * source)
       ret->dim[1].ubound = source->dim[0].ubound - source->dim[0].lbound;
       ret->dim[1].stride = ret->dim[0].ubound+1;
 
-      ret->data = internal_malloc_size (sizeof (GFC_INTEGER_4) * size0 (ret));
+      ret->data = internal_malloc_size (sizeof (GFC_INTEGER_4) * size0 ((array_t *) ret));
       ret->base = 0;
     }
 
diff --git a/libgfortran/generated/transpose_i8.c b/libgfortran/generated/transpose_i8.c
index f89dd6aac5a7172aaaa2505aee62c555503313d2..605ac7286f25031a06f106e49478e0f3e17e1eae 100644
--- a/libgfortran/generated/transpose_i8.c
+++ b/libgfortran/generated/transpose_i8.c
@@ -63,7 +63,7 @@ transpose_i8 (gfc_array_i8 * ret, gfc_array_i8 * source)
       ret->dim[1].ubound = source->dim[0].ubound - source->dim[0].lbound;
       ret->dim[1].stride = ret->dim[0].ubound+1;
 
-      ret->data = internal_malloc_size (sizeof (GFC_INTEGER_8) * size0 (ret));
+      ret->data = internal_malloc_size (sizeof (GFC_INTEGER_8) * size0 ((array_t *) ret));
       ret->base = 0;
     }
 
diff --git a/libgfortran/intrinsics/etime.c b/libgfortran/intrinsics/etime.c
index 62ae2884ba4a73b7bd48fdc13526922f5b44a3be..105570087a30a928a6fe0ded75bdead446c5f019 100644
--- a/libgfortran/intrinsics/etime.c
+++ b/libgfortran/intrinsics/etime.c
@@ -1,5 +1,5 @@
 /* Implementation of the ETIME intrinsic.
-   Copyright (C) 2004 Free Software Foundation, Inc.
+   Copyright (C) 2004, 2005 Free Software Foundation, Inc.
    Contributed by Steven G. Kargl <kargls@comcast.net>.
 
 This file is part of the GNU Fortran 95 runtime library (libgfortran).
@@ -46,7 +46,6 @@ void
 etime_sub (gfc_array_r4 *t, GFC_REAL_4 *result)
 {
   GFC_REAL_4 tu, ts, tt, *tp;
-  index_type dim;
 
 #if defined(HAVE_SYS_TIME_H) && defined(HAVE_SYS_RESOURCE_H)
   struct rusage rt;
diff --git a/libgfortran/intrinsics/random.c b/libgfortran/intrinsics/random.c
index 7607bb15b03a103d1276ef143c147be39e8def87..ed65c99d99406a07b0215a5a9a11e93696083113 100644
--- a/libgfortran/intrinsics/random.c
+++ b/libgfortran/intrinsics/random.c
@@ -1,5 +1,5 @@
 /* Implementation of the RANDOM intrinsics
-   Copyright 2002, 2004 Free Software Foundation, Inc.
+   Copyright 2002, 2004, 2005 Free Software Foundation, Inc.
    Contributed by Lars Segerlund <seger@linuxmail.org>
    and Steve Kargl.
 
@@ -440,7 +440,7 @@ KISS algorithm.  */
 #define GFC_SR(k, n)	((k)^((k)>>(n)))
 
 static const GFC_INTEGER_4 kiss_size = 4;
-#define KISS_DEFAULT_SEED {123456789, 362436069, 521288629, 916191069};
+#define KISS_DEFAULT_SEED {123456789, 362436069, 521288629, 916191069}
 static const GFC_UINTEGER_4 kiss_default_seed[4] = KISS_DEFAULT_SEED;
 static GFC_UINTEGER_4 kiss_seed[4] = KISS_DEFAULT_SEED;
 
diff --git a/libgfortran/io/close.c b/libgfortran/io/close.c
index 7516cff7e5007b6910d1fca7b91fea3363211adf..ee4fb974e5ebe96f27e6a00143762cfafc938474 100644
--- a/libgfortran/io/close.c
+++ b/libgfortran/io/close.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002-2003 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
    Contributed by Andy Vaught
 
 This file is part of the GNU Fortran 95 runtime library (libgfortran).
@@ -38,7 +38,7 @@ close_status;
 static st_option status_opt[] = {
   {"keep", CLOSE_KEEP},
   {"delete", CLOSE_DELETE},
-  {NULL}
+  {NULL, 0}
 };
 
 
diff --git a/libgfortran/io/io.h b/libgfortran/io/io.h
index 4814d8daf22d50b8740feea44a059c0a846f4337..d98f28ad7ccf114bca54d33d2aa64a83c384e104 100644
--- a/libgfortran/io/io.h
+++ b/libgfortran/io/io.h
@@ -597,13 +597,13 @@ internal_proto(list_formatted_read);
 extern void finish_list_read (void);
 internal_proto(finish_list_read);
 
-extern void init_at_eol();
+extern void init_at_eol (void);
 internal_proto(init_at_eol);
 
-extern void namelist_read();
+extern void namelist_read (void);
 internal_proto(namelist_read);
 
-extern void namelist_write();
+extern void namelist_write (void);
 internal_proto(namelist_write);
 
 /* write.c */
diff --git a/libgfortran/io/list_read.c b/libgfortran/io/list_read.c
index 28def564278227ed5a37d06731ca1876b83b7880..0e2cb41be799ecb0523bee8348a73430ae2afb44 100644
--- a/libgfortran/io/list_read.c
+++ b/libgfortran/io/list_read.c
@@ -2188,8 +2188,8 @@ get_name:
 
   if (c == '(' && nl->type == GFC_DTYPE_CHARACTER)
     {
-      descriptor_dimension chd[1] = {1, clow, nl->string_length};
-      nml_loop_spec ind[1] = {1, clow, nl->string_length, 1};
+      descriptor_dimension chd[1] = { {1, clow, nl->string_length} };
+      nml_loop_spec ind[1] = { {1, clow, nl->string_length, 1} };
 
       if (nml_parse_qualifier (chd, ind, 1) == FAILURE)
 	{
diff --git a/libgfortran/io/lock.c b/libgfortran/io/lock.c
index d85c9b8c93f9e06d2c8e48667df1d3bd54c8bce1..516d87053174d32f7fe914e73c5dba321cfd7fde 100644
--- a/libgfortran/io/lock.c
+++ b/libgfortran/io/lock.c
@@ -33,11 +33,11 @@ Boston, MA 02111-1307, USA.  */
 #include "libgfortran.h"
 #include "io.h"
 
-st_parameter ioparm = { };
+st_parameter ioparm;
 iexport_data(ioparm);
 
-namelist_info *ionml = 0;
-global_t g = { };
+namelist_info *ionml;
+global_t g;
 
 
 /* library_start()-- Called with a library call is entered.  */
diff --git a/libgfortran/io/transfer.c b/libgfortran/io/transfer.c
index bece250d78ca1a5c9995741d7098a44dada4d3c3..1122a50b6d6bab8f827062f3645aa675772af05b 100644
--- a/libgfortran/io/transfer.c
+++ b/libgfortran/io/transfer.c
@@ -82,7 +82,7 @@ gfc_unit *current_unit = NULL;
 static int sf_seen_eor = 0;
 static int eor_condition = 0;
 
-char scratch[SCRATCH_SIZE] = { };
+char scratch[SCRATCH_SIZE];
 static char *line_buffer = NULL;
 
 static unit_advance advance_status;
@@ -90,7 +90,7 @@ static unit_advance advance_status;
 static st_option advance_opt[] = {
   {"yes", ADVANCE_YES},
   {"no", ADVANCE_NO},
-  {NULL}
+  {NULL, 0}
 };
 
 
diff --git a/libgfortran/io/write.c b/libgfortran/io/write.c
index faf8b90d4f68d84f64ce0e34c17cb8fd8a5c313a..553557d7b885b79a7e031fdbaeaa972eec1527d9 100644
--- a/libgfortran/io/write.c
+++ b/libgfortran/io/write.c
@@ -1490,7 +1490,7 @@ nml_write_obj (namelist_info * obj, index_type offset,
 		{
 		  strcat (ext_name, dim_i ? "" : "(");
 		  clen = strlen (ext_name);
-		  st_sprintf (ext_name + clen, "%d", obj->ls[dim_i].idx);
+		  st_sprintf (ext_name + clen, "%ld", (long) obj->ls[dim_i].idx);
 		  strcat (ext_name, (dim_i == obj->var_rank - 1) ? ")" : ",");
 		}
 
diff --git a/libgfortran/m4/matmul.m4 b/libgfortran/m4/matmul.m4
index 90274504d375693ac2fca07b585c21d44a8845f9..1d1ec6018a9e7e97bc2d0653d8c92b88c93c98b5 100644
--- a/libgfortran/m4/matmul.m4
+++ b/libgfortran/m4/matmul.m4
@@ -1,5 +1,5 @@
 `/* Implementation of the MATMUL intrinsic
-   Copyright 2002 Free Software Foundation, Inc.
+   Copyright 2002, 2005 Free Software Foundation, Inc.
    Contributed by Paul Brook <paul@nowt.org>
 
 This file is part of the GNU Fortran 95 runtime library (libgfortran).
@@ -100,7 +100,7 @@ matmul_`'rtype_code (rtype * retarray, rtype * a, rtype * b)
         }
           
       retarray->data
-	= internal_malloc_size (sizeof (rtype_name) * size0 (retarray));
+	= internal_malloc_size (sizeof (rtype_name) * size0 ((array_t *) retarray));
       retarray->base = 0;
     }
 
@@ -180,7 +180,7 @@ sinclude(`matmul_asm_'rtype_code`.m4')dnl
       rtype_name *abase_n;
       rtype_name bbase_yn;
 
-      memset (dest, 0, (sizeof (rtype_name) * size0(retarray)));
+      memset (dest, 0, (sizeof (rtype_name) * size0((array_t *) retarray)));
 
       for (y = 0; y < ycount; y++)
 	{
diff --git a/libgfortran/m4/transpose.m4 b/libgfortran/m4/transpose.m4
index 4ae6c091c62e32024f1b098b3eb58d6f7b40033a..2ec1495a40a696b32b1679fd36355f9199cdec46 100644
--- a/libgfortran/m4/transpose.m4
+++ b/libgfortran/m4/transpose.m4
@@ -64,7 +64,7 @@ transpose_`'rtype_code (rtype * ret, rtype * source)
       ret->dim[1].ubound = source->dim[0].ubound - source->dim[0].lbound;
       ret->dim[1].stride = ret->dim[0].ubound+1;
 
-      ret->data = internal_malloc_size (sizeof (rtype_name) * size0 (ret));
+      ret->data = internal_malloc_size (sizeof (rtype_name) * size0 ((array_t *) ret));
       ret->base = 0;
     }
 
diff --git a/libgfortran/runtime/environ.c b/libgfortran/runtime/environ.c
index 1b7fc5f80d2272fa3418e1a726daffb0b58dbef4..4c2cd99ad158f544c94a67dd5226e35815998a19 100644
--- a/libgfortran/runtime/environ.c
+++ b/libgfortran/runtime/environ.c
@@ -46,7 +46,7 @@ Boston, MA 02111-1307, USA.  */
  * but other variables are checked during execution of the user's
  * program. */
 
-options_t options = { };
+options_t options;
 
 
 typedef struct variable
@@ -326,7 +326,7 @@ show_sep (variable * v)
 
 
 static void
-init_string (variable * v)
+init_string (variable * v __attribute__ ((unused)))
 {
 }
 
@@ -361,7 +361,7 @@ static choice rounding[] = {
   {"UP", FP_ROUND_UP},
   {"DOWN", FP_ROUND_DOWN},
   {"ZERO", FP_ROUND_ZERO},
-  {NULL}
+  {NULL, 0}
 };
 
 static choice precision[] =
@@ -369,14 +369,14 @@ static choice precision[] =
   { "24", 1},
   { "53", 2},
   { "64", 0},
-  { NULL}
+  { NULL, 0}
 };
 
 static choice signal_choices[] =
 {
   { "IGNORE", 1},
   { "ABORT", 0},
-  { NULL}
+  { NULL, 0}
 };
 
 
@@ -463,98 +463,100 @@ show_signal (variable * v)
 static variable variable_table[] = {
   {"GFORTRAN_STDIN_UNIT", 5, &options.stdin_unit, init_integer, show_integer,
    "Unit number that will be preconnected to standard input\n"
-   "(No preconnection if negative)"},
+   "(No preconnection if negative)", 0},
 
   {"GFORTRAN_STDOUT_UNIT", 6, &options.stdout_unit, init_integer,
    show_integer,
    "Unit number that will be preconnected to standard output\n"
-   "(No preconnection if negative)"},
+   "(No preconnection if negative)", 0},
 
   {"GFORTRAN_STDERR_UNIT", 0, &options.stderr_unit, init_integer,
    show_integer,
    "Unit number that will be preconnected to standard error\n"
-   "(No preconnection if negative)"},
+   "(No preconnection if negative)", 0},
 
   {"GFORTRAN_USE_STDERR", 1, &options.use_stderr, init_boolean,
    show_boolean,
-   "Sends library output to standard error instead of standard output."},
+   "Sends library output to standard error instead of standard output.", 0},
 
   {"GFORTRAN_TMPDIR", 0, NULL, init_string, show_string,
    "Directory for scratch files.  Overrides the TMP environment variable\n"
-   "If TMP is not set " DEFAULT_TEMPDIR " is used."},
+   "If TMP is not set " DEFAULT_TEMPDIR " is used.", 0},
 
   {"GFORTRAN_UNBUFFERED_ALL", 0, &options.all_unbuffered, init_boolean,
    show_boolean,
    "If TRUE, all output is unbuffered.  This will slow down large writes "
-   "but can be\nuseful for forcing data to be displayed immediately."},
+   "but can be\nuseful for forcing data to be displayed immediately.", 0},
 
   {"GFORTRAN_SHOW_LOCUS", 1, &options.locus, init_boolean, show_boolean,
-   "If TRUE, print filename and line number where runtime errors happen."},
+   "If TRUE, print filename and line number where runtime errors happen.", 0},
 
   {"GFORTRAN_OPTIONAL_PLUS", 0, &options.optional_plus, init_boolean, show_boolean,
-   "Print optional plus signs in numbers where permitted.  Default FALSE."},
+   "Print optional plus signs in numbers where permitted.  Default FALSE.", 0},
 
   {"GFORTRAN_DEFAULT_RECL", DEFAULT_RECL, &options.default_recl,
    init_unsigned_integer, show_integer,
    "Default maximum record length for sequential files.  Most useful for\n"
    "adjusting line length of preconnected units.  Default "
-   stringize (DEFAULT_RECL)},
+   stringize (DEFAULT_RECL), 0},
 
   {"GFORTRAN_LIST_SEPARATOR", 0, NULL, init_sep, show_sep,
    "Separatator to use when writing list output.  May contain any number of "
-   "spaces\nand at most one comma.  Default is a single space."},
+   "spaces\nand at most one comma.  Default is a single space.", 0},
 
   /* Memory related controls */
 
   {"GFORTRAN_MEM_INIT", 0, NULL, init_mem, show_mem,
    "How to initialize allocated memory.  Default value is NONE for no "
    "initialization\n(faster), NAN for a Not-a-Number with the mantissa "
-   "0x40f95 or a custom\nhexadecimal value"},
+   "0x40f95 or a custom\nhexadecimal value", 0},
 
   {"GFORTRAN_MEM_CHECK", 0, &options.mem_check, init_boolean, show_boolean,
-   "Whether memory still allocated will be reported when the program ends."},
+   "Whether memory still allocated will be reported when the program ends.",
+   0},
 
   /* Signal handling (Unix).  */
 
   {"GFORTRAN_SIGHUP", 0, &options.sighup, init_signal, show_signal,
-   "Whether the program will IGNORE or ABORT on SIGHUP."},
+   "Whether the program will IGNORE or ABORT on SIGHUP.", 0},
 
   {"GFORTRAN_SIGINT", 0, &options.sigint, init_signal, show_signal,
-   "Whether the program will IGNORE or ABORT on SIGINT."},
+   "Whether the program will IGNORE or ABORT on SIGINT.", 0},
 
   /* Floating point control */
 
   {"GFORTRAN_FPU_ROUND", 0, &options.fpu_round, init_round, show_round,
-   "Set floating point rounding.  Values are NEAREST, UP, DOWN, ZERO."},
+   "Set floating point rounding.  Values are NEAREST, UP, DOWN, ZERO.", 0},
 
   {"GFORTRAN_FPU_PRECISION", 0, &options.fpu_precision, init_precision,
    show_precision,
-   "Precision of intermediate results.  Values are 24, 53 and 64."},
+   "Precision of intermediate results.  Values are 24, 53 and 64.", 0},
 
   {"GFORTRAN_FPU_INVALID", 1, &options.fpu_invalid, init_boolean,
    show_boolean,
-   "Raise a floating point exception on invalid FP operation."},
+   "Raise a floating point exception on invalid FP operation.", 0},
 
   {"GFORTRAN_FPU_DENORMAL", 1, &options.fpu_denormal, init_boolean,
    show_boolean,
-   "Raise a floating point exception when denormal numbers are encountered."},
+   "Raise a floating point exception when denormal numbers are encountered.",
+   0},
 
   {"GFORTRAN_FPU_ZERO", 0, &options.fpu_zerodiv, init_boolean, show_boolean,
-   "Raise a floating point exception when dividing by zero."},
+   "Raise a floating point exception when dividing by zero.", 0},
 
   {"GFORTRAN_FPU_OVERFLOW", 0, &options.fpu_overflow, init_boolean,
    show_boolean,
-   "Raise a floating point exception on overflow."},
+   "Raise a floating point exception on overflow.", 0},
 
   {"GFORTRAN_FPU_UNDERFLOW", 0, &options.fpu_underflow, init_boolean,
    show_boolean,
-   "Raise a floating point exception on underflow."},
+   "Raise a floating point exception on underflow.", 0},
 
   {"GFORTRAN_FPU_PRECISION", 0, &options.fpu_precision_loss, init_boolean,
    show_boolean,
-   "Raise a floating point exception on precision loss."},
+   "Raise a floating point exception on precision loss.", 0},
 
-  {NULL}
+  {NULL, 0, NULL, NULL, NULL, NULL, 0}
 };
 
 
diff --git a/libgfortran/runtime/main.c b/libgfortran/runtime/main.c
index 19c975f927f3d75256f3d64ba6c1c7b811b0f175..d2cedf7037105c5ecb1d2146a4fc18185ca126e8 100644
--- a/libgfortran/runtime/main.c
+++ b/libgfortran/runtime/main.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002-2003 Free Software Foundation, Inc.
+/* Copyright (C) 2002-2003, 2005 Free Software Foundation, Inc.
    Contributed by Andy Vaught and Paul Brook <paul@nowt.org>
 
 This file is part of the GNU Fortran 95 runtime library (libgfortran).
@@ -113,7 +113,7 @@ init (void)
 /* Cleanup the runtime library.  */
 
 static void __attribute__((destructor))
-cleanup ()
+cleanup (void)
 {
   close_units ();
 }
diff --git a/libgfortran/runtime/normalize.c b/libgfortran/runtime/normalize.c
index d65662d22fcb9d4bcb408ce39e591f31a0d5912c..350cd0c4b526314817424ce6fd2559f1ff782a71 100644
--- a/libgfortran/runtime/normalize.c
+++ b/libgfortran/runtime/normalize.c
@@ -1,5 +1,5 @@
 /* Nelper routines to convert from integer to real.
-   Copyright 2004 Free Software Foundation, Inc.
+   Copyright 2004, 2005 Free Software Foundation, Inc.
    Contributed by Paul Brook.
 
 This file is part of the GNU Fortran 95 runtime library (libgfortran).
@@ -36,7 +36,7 @@ Boston, MA 02111-1307, USA.  */
 /* Return the largest value less than one representable in a REAL*4.  */
 
 static inline GFC_REAL_4
-almostone_r4 ()
+almostone_r4 (void)
 {
 #ifdef HAVE_NEXTAFTERF
   return nextafterf (1.0f, 0.0f);
@@ -65,7 +65,7 @@ almostone_r4 ()
 /* Return the largest value less than one representable in a REAL*8.  */
 
 static inline GFC_REAL_8
-almostone_r8 ()
+almostone_r8 (void)
 {
 #ifdef HAVE_NEXTAFTER
   return nextafter (1.0, 0.0);