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
This commit is contained in:
Laurent Guerby 2001-11-17 11:35:08 +00:00 committed by Laurent Guerby
parent b605ed61ea
commit b0df4321ea
8 changed files with 89 additions and 27 deletions

View File

@ -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.

View File

@ -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

View File

@ -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

View File

@ -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 c_fileno (FILE *s) { return fileno (s); }
int
seek_end_function ()
{
return SEEK_END;
}
void *null_function ()
{
return NULL;
}
int
c_fileno (s)
FILE *s;
{
return fileno (s);
}

View File

@ -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},

View File

@ -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

View File

@ -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

View File

@ -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;