aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorLaurent Guerby <guerby@acm.org>2001-11-17 11:35:08 +0000
committerLaurent Guerby <guerby@gcc.gnu.org>2001-11-17 11:35:08 +0000
commitb0df4321ea7db2dbe0194cec032926c5cf31c11d (patch)
tree39e493e87df2945a110142da9ac42207c0aaa146 /gcc
parentb605ed61ea5d9003fdee72c0dc8e86b80ee15c43 (diff)
downloadgcc-b0df4321ea7db2dbe0194cec032926c5cf31c11d.zip
gcc-b0df4321ea7db2dbe0194cec032926c5cf31c11d.tar.gz
gcc-b0df4321ea7db2dbe0194cec032926c5cf31c11d.tar.bz2
Make-lang.in (GNATLIBFLAGS): Add -W -Wall.
2001-11-17 Laurent Guerby <guerby@acm.org> * Make-lang.in (GNATLIBFLAGS): Add -W -Wall. * gigi.h (init_decl_processing): Rename to gnat_init_decl_processing. * io-aux.c: Provide K&R prototypes to all functions, reformat code. * lang-spec.h: Add missing struct field to silence warnings. * sysdep.c (rts_get_*): Provide K&R prototype. * sysdep.c (Unlock_Task, Lock_Task): Move to K&R prototype. * traceback.c (Unlock_Task, Lock_Task): Likewise. * tracebak.c (__gnat_backtrace): Remove unused variable. * utils.c (end_subprog_body): Move to K&R style. From-SVN: r47117
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/ChangeLog12
-rw-r--r--gcc/ada/Make-lang.in2
-rw-r--r--gcc/ada/gigi.h2
-rw-r--r--gcc/ada/io-aux.c62
-rw-r--r--gcc/ada/lang-specs.h8
-rw-r--r--gcc/ada/sysdep.c19
-rw-r--r--gcc/ada/tracebak.c7
-rw-r--r--gcc/ada/utils.c4
8 files changed, 89 insertions, 27 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index dce151b..b5a7745 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,15 @@
+2001-11-17 Laurent Guerby <guerby@acm.org>
+
+ * Make-lang.in (GNATLIBFLAGS): Add -W -Wall.
+ * gigi.h (init_decl_processing): Rename to gnat_init_decl_processing.
+ * io-aux.c: Provide K&R prototypes to all functions, reformat code.
+ * lang-spec.h: Add missing struct field to silence warnings.
+ * sysdep.c (rts_get_*): Provide K&R prototype.
+ * sysdep.c (Unlock_Task, Lock_Task): Move to K&R prototype.
+ * traceback.c (Unlock_Task, Lock_Task): Likewise.
+ * tracebak.c (__gnat_backtrace): Remove unused variable.
+ * utils.c (end_subprog_body): Move to K&R style.
+
Thu Nov 15 18:16:17 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* trans.c, utils2.c: Remove PALIGN parameter to get_inner_reference.
diff --git a/gcc/ada/Make-lang.in b/gcc/ada/Make-lang.in
index 3ae936e..ab61917 100644
--- a/gcc/ada/Make-lang.in
+++ b/gcc/ada/Make-lang.in
@@ -48,7 +48,7 @@ shext =
# Extra flags to pass to recursive makes.
BOOT_ADAFLAGS= $(ADAFLAGS)
ADAFLAGS= -W -Wall -gnatpg -gnata
-GNATLIBFLAGS= -gnatpg
+GNATLIBFLAGS= -W -Wall -gnatpg
GNATLIBCFLAGS= -g -O2
ADA_INCLUDE_DIR = $(libsubdir)/adainclude
ADA_RTL_OBJ_DIR = $(libsubdir)/adalib
diff --git a/gcc/ada/gigi.h b/gcc/ada/gigi.h
index 8284853..15d3b65 100644
--- a/gcc/ada/gigi.h
+++ b/gcc/ada/gigi.h
@@ -433,7 +433,7 @@ extern tree pushdecl PARAMS ((tree));
/* Create the predefined scalar types such as `integer_type_node' needed
in the gcc back-end and initialize the global binding level. */
-extern void init_decl_processing PARAMS ((void));
+extern void gnat_init_decl_processing PARAMS ((void));
extern void init_gigi_decls PARAMS ((tree, tree));
/* Return an integer type with the number of bits of precision given by
diff --git a/gcc/ada/io-aux.c b/gcc/ada/io-aux.c
index 33fbd5f..d42f362 100644
--- a/gcc/ada/io-aux.c
+++ b/gcc/ada/io-aux.c
@@ -6,7 +6,7 @@
* *
* C Implementation File *
* *
- * $Revision: 1.5 $
+ * $Revision: 1.1 $
* *
* Copyright (C) 1992-2001 Free Software Foundation, Inc. *
* *
@@ -34,12 +34,40 @@
#include <stdio.h>
+#ifdef IN_RTS
+#include "tconfig.h"
+#else
+#include "config.h"
+#endif
+
/* Function wrappers are needed to access the values from Ada which are */
/* defined as C macros. */
-FILE *c_stdin (void) { return stdin; }
-FILE *c_stdout (void) { return stdout;}
-FILE *c_stderr (void) { return stderr;}
+FILE *c_stdin PARAMS ((void));
+FILE *c_stdout PARAMS ((void));
+FILE *c_stderr PARAMS ((void));
+int seek_set_function PARAMS ((void));
+int seek_end_function PARAMS ((void));
+void *null_function PARAMS ((void));
+int c_fileno PARAMS ((FILE *));
+
+FILE *
+c_stdin ()
+{
+ return stdin;
+}
+
+FILE *
+c_stdout ()
+{
+ return stdout;
+}
+
+FILE *
+c_stderr ()
+{
+ return stderr;
+}
#ifndef SEEK_SET /* Symbolic constants for the "fseek" function: */
#define SEEK_SET 0 /* Set file pointer to offset */
@@ -47,8 +75,26 @@ FILE *c_stderr (void) { return stderr;}
#define SEEK_END 2 /* Set file pointer to the size of the file plus offset */
#endif
-int seek_set_function (void) { return SEEK_SET; }
-int seek_end_function (void) { return SEEK_END; }
-void *null_function (void) { return NULL; }
+int
+seek_set_function ()
+{
+ return SEEK_SET;
+}
+
+int
+seek_end_function ()
+{
+ return SEEK_END;
+}
+
+void *null_function ()
+{
+ return NULL;
+}
-int c_fileno (FILE *s) { return fileno (s); }
+int
+c_fileno (s)
+ FILE *s;
+{
+ return fileno (s);
+}
diff --git a/gcc/ada/lang-specs.h b/gcc/ada/lang-specs.h
index 0019bb9..cc29d52 100644
--- a/gcc/ada/lang-specs.h
+++ b/gcc/ada/lang-specs.h
@@ -6,7 +6,7 @@
* *
* C Header File *
* *
- * $Revision: 1.17 $
+ * $Revision: 1.1 $
* *
* Copyright (C) 1992-2001 Free Software Foundation, Inc. *
* *
@@ -29,8 +29,8 @@
/* This is the contribution to the `default_compilers' array in gcc.c for
GNAT. */
- {".ads", "@ada"},
- {".adb", "@ada"},
+ {".ads", "@ada", 0},
+ {".adb", "@ada", 0},
{"@ada",
"gnat1 %{^I*} %{k8:-gnatk8} %{w:-gnatws} %1 %{!Q:-quiet} %{nostdinc*}\
-dumpbase %{.adb:%b.adb}%{.ads:%b.ads}%{!.adb:%{!.ads:%b.ada}}\
@@ -40,4 +40,4 @@
%i %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\
%{!S:%{!gnatc:%{!gnatz:%{!gnats:as %a %Y %{c:%W{o*}%{!o*:-o %w%b%O}}\
%{!c:%e-c or -S required for Ada}\
- %{!pipe:%g.s} %A\n}}}} "},
+ %{!pipe:%g.s} %A\n}}}} ", 0},
diff --git a/gcc/ada/sysdep.c b/gcc/ada/sysdep.c
index 3ae033a..ed8988a 100644
--- a/gcc/ada/sysdep.c
+++ b/gcc/ada/sysdep.c
@@ -6,7 +6,7 @@
* *
* C Implementation File *
* *
- * $Revision$
+ * $Revision: 1.3 $
* *
* Copyright (C) 1992-2001 Free Software Foundation, Inc. *
* *
@@ -521,10 +521,15 @@ getc_immediate_common (stream, ch, end_of_file, avail, waiting)
will want to import these). We use the same names as the routines used
by AdaMagic for compatibility. */
-char *rts_get_hInstance (void) { return (GetModuleHandleA (0)); }
-char *rts_get_hPrevInstance (void) { return (0); }
-char *rts_get_lpCommandLine (void) { return (GetCommandLineA ()); }
-int rts_get_nShowCmd (void) { return (1); }
+char *rts_get_hInstance PARAMS ((void));
+char *rts_get_hPrevInstance PARAMS ((void));
+char *rts_get_lpCommandLine PARAMS ((void));
+int rts_get_nShowCmd PARAMS ((void));
+
+char *rts_get_hInstance () { return (GetModuleHandleA (0)); }
+char *rts_get_hPrevInstance () { return (0); }
+char *rts_get_lpCommandLine () { return (GetCommandLineA ()); }
+int rts_get_nShowCmd () { return (1); }
#endif /* WINNT */
#ifdef VMS
@@ -551,10 +556,10 @@ get_gmtoff ()
#if defined (_AIX) || defined (__EMX__)
#define Lock_Task system__soft_links__lock_task
-extern void (*Lock_Task) (void);
+extern void (*Lock_Task) PARAMS ((void));
#define Unlock_Task system__soft_links__unlock_task
-extern void (*Unlock_Task) (void);
+extern void (*Unlock_Task) PARAMS ((void));
/* Provide reentrant version of localtime on Aix and OS/2. Note that AiX does
provide localtime_r, but in the library libc_r which doesn't get included
diff --git a/gcc/ada/tracebak.c b/gcc/ada/tracebak.c
index 890d0e8..287e8d4 100644
--- a/gcc/ada/tracebak.c
+++ b/gcc/ada/tracebak.c
@@ -6,7 +6,7 @@
* *
* C Implementation File *
* *
- * $Revision$
+ * $Revision: 1.2 $
* *
* Copyright (C) 2000-2001 Ada Core Technologies, Inc. *
* *
@@ -61,10 +61,10 @@
#endif
#define Lock_Task system__soft_links__lock_task
-extern void (*Lock_Task) (void);
+extern void (*Lock_Task) PARAMS ((void));
#define Unlock_Task system__soft_links__unlock_task
-extern void (*Unlock_Task) (void);
+extern void (*Unlock_Task) PARAMS ((void));
#ifndef CURRENT_STACK_FRAME
# define CURRENT_STACK_FRAME ({ char __csf; &__csf; })
@@ -202,7 +202,6 @@ __gnat_backtrace (array, size, exclude_min, exclude_max)
struct layout *current;
void *top_frame;
void *top_stack;
- void *ret;
int cnt = 0;
#ifdef PROTECT_SEGV
diff --git a/gcc/ada/utils.c b/gcc/ada/utils.c
index 1b4f805..e5375b4 100644
--- a/gcc/ada/utils.c
+++ b/gcc/ada/utils.c
@@ -6,7 +6,7 @@
* *
* C Implementation File *
* *
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
* *
* Copyright (C) 1992-2001, Free Software Foundation, Inc. *
* *
@@ -1829,7 +1829,7 @@ begin_subprog_body (subprog_decl)
to assembler language output. */
void
-end_subprog_body (void)
+end_subprog_body ()
{
tree decl;
tree cico_list;