This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[Ada] warning patrol episode II


Warnings left for other people: 

- decl.c: the signed/unsigned compare might be intentional, I can't say.

- sysdep.c: uses #elif and -Wtraditional, I don't know wether it's better
to remove -Wtraditional of to unglify to avoid #elif.

- all GNAT C RTS compiles complain:
cc1: warning: changing search order for system directory "../../include"
cc1: warning:   as it has already been specified as a non-system directory
No idea of what it's about.

Bootstraped and make check on i686-pc-linux-gnu.

-- 
Laurent Guerby <guerby@acm.org>

2001-10-28  Laurent Guerby <guerby@acm.org>

	* init.c (Raise_From_Signal_Handler, Propagate_Signal_Exception, 
        __gnat_error_handler): Constify to silence warnings.

	* lang-spec.h: Add missing struct field to silence warnings.

Index: init.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/ada/init.c,v
retrieving revision 1.3
diff -c -3 -p -r1.3 init.c
*** init.c	2001/10/28 12:55:51	1.3
--- init.c	2001/10/28 15:53:48
*************** extern int    (*Check_Abort_Status) PARA
*** 86,97 ****
  #define Raise_From_Signal_Handler \
                        ada__exceptions__raise_from_signal_handler
  extern void   Raise_From_Signal_Handler PARAMS ((struct Exception_Data *,
! 						char *));
  
  #define Propagate_Signal_Exception \
                        __gnat_propagate_sig_exc
  extern void   Propagate_Signal_Exception
! 	PARAMS ((struct Machine_State *, struct Exception_Data *, char *));
  
  
  /* Copies of global values computed by the binder */
--- 86,97 ----
  #define Raise_From_Signal_Handler \
                        ada__exceptions__raise_from_signal_handler
  extern void   Raise_From_Signal_Handler PARAMS ((struct Exception_Data *,
! 						const char *));
  
  #define Propagate_Signal_Exception \
                        __gnat_propagate_sig_exc
  extern void   Propagate_Signal_Exception
! 	PARAMS ((struct Machine_State *, struct Exception_Data *, const char *));
  
  
  /* Copies of global values computed by the binder */
*************** __gnat_error_handler (sig)
*** 226,232 ****
       int sig;
  {
    struct Exception_Data *exception;
!   char *msg;
  
    switch (sig)
      {
--- 226,232 ----
       int sig;
  {
    struct Exception_Data *exception;
!   const char *msg;
  
    switch (sig)
      {
*************** __gnat_error_handler (sig)
*** 557,563 ****
       int sig;
  {
    struct Exception_Data *exception;
!   char *msg;
    static int recurse = 0;
  
    struct sigcontext *info
--- 557,563 ----
       int sig;
  {
    struct Exception_Data *exception;
!   const char *msg;
    static int recurse = 0;
  
    struct sigcontext *info
Index: lang-specs.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/ada/lang-specs.h,v
retrieving revision 1.1
diff -c -3 -p -r1.1 lang-specs.h
*** lang-specs.h	2001/10/02 14:18:39	1.1
--- lang-specs.h	2001/10/28 15:53:48
***************
*** 29,36 ****
  /* This is the contribution to the `default_compilers' array in gcc.c for
     GNAT.  */
  
!   {".ads", "@ada"},
!   {".adb", "@ada"},
    {"@ada",
     "gnat1 %{^I*} %{k8:-gnatk8} %{w:-gnatws} %1 %{!Q:-quiet} %{nostdinc*}\
      -dumpbase %{.adb:%b.adb}%{.ads:%b.ads}%{!.adb:%{!.ads:%b.ada}}\
--- 29,36 ----
  /* This is the contribution to the `default_compilers' array in gcc.c for
     GNAT.  */
  
!   {".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,43 ****
      %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}}}} "},
--- 40,43 ----
      %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}}}} ", 0},


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]