Commit b0df4321 by Laurent Guerby Committed by Laurent Guerby

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
parent b605ed61
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> 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. * trans.c, utils2.c: Remove PALIGN parameter to get_inner_reference.
......
...@@ -48,7 +48,7 @@ shext = ...@@ -48,7 +48,7 @@ shext =
# Extra flags to pass to recursive makes. # Extra flags to pass to recursive makes.
BOOT_ADAFLAGS= $(ADAFLAGS) BOOT_ADAFLAGS= $(ADAFLAGS)
ADAFLAGS= -W -Wall -gnatpg -gnata ADAFLAGS= -W -Wall -gnatpg -gnata
GNATLIBFLAGS= -gnatpg GNATLIBFLAGS= -W -Wall -gnatpg
GNATLIBCFLAGS= -g -O2 GNATLIBCFLAGS= -g -O2
ADA_INCLUDE_DIR = $(libsubdir)/adainclude ADA_INCLUDE_DIR = $(libsubdir)/adainclude
ADA_RTL_OBJ_DIR = $(libsubdir)/adalib ADA_RTL_OBJ_DIR = $(libsubdir)/adalib
......
...@@ -433,7 +433,7 @@ extern tree pushdecl PARAMS ((tree)); ...@@ -433,7 +433,7 @@ extern tree pushdecl PARAMS ((tree));
/* Create the predefined scalar types such as `integer_type_node' needed /* Create the predefined scalar types such as `integer_type_node' needed
in the gcc back-end and initialize the global binding level. */ 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)); extern void init_gigi_decls PARAMS ((tree, tree));
/* Return an integer type with the number of bits of precision given by /* Return an integer type with the number of bits of precision given by
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* * * *
* C Implementation File * * C Implementation File *
* * * *
* $Revision: 1.5 $ * $Revision: 1.1 $
* * * *
* Copyright (C) 1992-2001 Free Software Foundation, Inc. * * Copyright (C) 1992-2001 Free Software Foundation, Inc. *
* * * *
...@@ -34,12 +34,40 @@ ...@@ -34,12 +34,40 @@
#include <stdio.h> #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 */ /* Function wrappers are needed to access the values from Ada which are */
/* defined as C macros. */ /* defined as C macros. */
FILE *c_stdin (void) { return stdin; } FILE *c_stdin PARAMS ((void));
FILE *c_stdout (void) { return stdout;} FILE *c_stdout PARAMS ((void));
FILE *c_stderr (void) { return stderr;} 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: */ #ifndef SEEK_SET /* Symbolic constants for the "fseek" function: */
#define SEEK_SET 0 /* Set file pointer to offset */ #define SEEK_SET 0 /* Set file pointer to offset */
...@@ -47,8 +75,26 @@ FILE *c_stderr (void) { return stderr;} ...@@ -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 */ #define SEEK_END 2 /* Set file pointer to the size of the file plus offset */
#endif #endif
int seek_set_function (void) { return SEEK_SET; } int
int seek_end_function (void) { return SEEK_END; } seek_set_function ()
void *null_function (void) { return NULL; } {
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);
}
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* * * *
* C Header File * * C Header File *
* * * *
* $Revision: 1.17 $ * $Revision: 1.1 $
* * * *
* Copyright (C) 1992-2001 Free Software Foundation, Inc. * * Copyright (C) 1992-2001 Free Software Foundation, Inc. *
* * * *
...@@ -29,8 +29,8 @@ ...@@ -29,8 +29,8 @@
/* This is the contribution to the `default_compilers' array in gcc.c for /* This is the contribution to the `default_compilers' array in gcc.c for
GNAT. */ GNAT. */
{".ads", "@ada"}, {".ads", "@ada", 0},
{".adb", "@ada"}, {".adb", "@ada", 0},
{"@ada", {"@ada",
"gnat1 %{^I*} %{k8:-gnatk8} %{w:-gnatws} %1 %{!Q:-quiet} %{nostdinc*}\ "gnat1 %{^I*} %{k8:-gnatk8} %{w:-gnatws} %1 %{!Q:-quiet} %{nostdinc*}\
-dumpbase %{.adb:%b.adb}%{.ads:%b.ads}%{!.adb:%{!.ads:%b.ada}}\ -dumpbase %{.adb:%b.adb}%{.ads:%b.ads}%{!.adb:%{!.ads:%b.ada}}\
...@@ -40,4 +40,4 @@ ...@@ -40,4 +40,4 @@
%i %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\ %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}}\ %{!S:%{!gnatc:%{!gnatz:%{!gnats:as %a %Y %{c:%W{o*}%{!o*:-o %w%b%O}}\
%{!c:%e-c or -S required for Ada}\ %{!c:%e-c or -S required for Ada}\
%{!pipe:%g.s} %A\n}}}} "}, %{!pipe:%g.s} %A\n}}}} ", 0},
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* * * *
* C Implementation File * * C Implementation File *
* * * *
* $Revision$ * $Revision: 1.3 $
* * * *
* Copyright (C) 1992-2001 Free Software Foundation, Inc. * * Copyright (C) 1992-2001 Free Software Foundation, Inc. *
* * * *
...@@ -521,10 +521,15 @@ getc_immediate_common (stream, ch, end_of_file, avail, waiting) ...@@ -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 will want to import these). We use the same names as the routines used
by AdaMagic for compatibility. */ by AdaMagic for compatibility. */
char *rts_get_hInstance (void) { return (GetModuleHandleA (0)); } char *rts_get_hInstance PARAMS ((void));
char *rts_get_hPrevInstance (void) { return (0); } char *rts_get_hPrevInstance PARAMS ((void));
char *rts_get_lpCommandLine (void) { return (GetCommandLineA ()); } char *rts_get_lpCommandLine PARAMS ((void));
int rts_get_nShowCmd (void) { return (1); } 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 */ #endif /* WINNT */
#ifdef VMS #ifdef VMS
...@@ -551,10 +556,10 @@ get_gmtoff () ...@@ -551,10 +556,10 @@ get_gmtoff ()
#if defined (_AIX) || defined (__EMX__) #if defined (_AIX) || defined (__EMX__)
#define Lock_Task system__soft_links__lock_task #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 #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 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 provide localtime_r, but in the library libc_r which doesn't get included
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* * * *
* C Implementation File * * C Implementation File *
* * * *
* $Revision$ * $Revision: 1.2 $
* * * *
* Copyright (C) 2000-2001 Ada Core Technologies, Inc. * * Copyright (C) 2000-2001 Ada Core Technologies, Inc. *
* * * *
...@@ -61,10 +61,10 @@ ...@@ -61,10 +61,10 @@
#endif #endif
#define Lock_Task system__soft_links__lock_task #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 #define Unlock_Task system__soft_links__unlock_task
extern void (*Unlock_Task) (void); extern void (*Unlock_Task) PARAMS ((void));
#ifndef CURRENT_STACK_FRAME #ifndef CURRENT_STACK_FRAME
# define CURRENT_STACK_FRAME ({ char __csf; &__csf; }) # define CURRENT_STACK_FRAME ({ char __csf; &__csf; })
...@@ -202,7 +202,6 @@ __gnat_backtrace (array, size, exclude_min, exclude_max) ...@@ -202,7 +202,6 @@ __gnat_backtrace (array, size, exclude_min, exclude_max)
struct layout *current; struct layout *current;
void *top_frame; void *top_frame;
void *top_stack; void *top_stack;
void *ret;
int cnt = 0; int cnt = 0;
#ifdef PROTECT_SEGV #ifdef PROTECT_SEGV
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* * * *
* C Implementation File * * C Implementation File *
* * * *
* $Revision: 1.3 $ * $Revision: 1.4 $
* * * *
* Copyright (C) 1992-2001, Free Software Foundation, Inc. * * Copyright (C) 1992-2001, Free Software Foundation, Inc. *
* * * *
...@@ -1829,7 +1829,7 @@ begin_subprog_body (subprog_decl) ...@@ -1829,7 +1829,7 @@ begin_subprog_body (subprog_decl)
to assembler language output. */ to assembler language output. */
void void
end_subprog_body (void) end_subprog_body ()
{ {
tree decl; tree decl;
tree cico_list; tree cico_list;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment