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 III


Bootstapped and gnatlib_and_tools on i686-pc-linux-gnu. Should also be
tested on NT and VMS, but I don't have access to such machines.

I noticed the Ada RTS is not built with -W -Wall as the compiler and C
RTS sources are, is this intentional? If not I assume a patch enabling
them and a new exciting episode of "warning patrol" is to be
scheduled?

-- 
Laurent Guerby <guerby@acm.org>

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

	    sysdep.c: Avoid use of #elif to silence warnings.

Index: sysdep.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/ada/sysdep.c,v
retrieving revision 1.2
diff -c -3 -p -r1.2 sysdep.c
*** sysdep.c	2001/10/04 19:30:04	1.2
--- sysdep.c	2001/10/28 21:47:25
*************** __gnat_ttyname (filedes)
*** 295,304 ****
    || defined (__MACHTEN__)
  #include <termios.h>
  
! #elif defined (VMS)
  extern char *decc$ga_stdscr;
  static int initted = 0;
  #endif
  
  /* Implements the common processing for getc_immediate and
     getc_immediate_nowait. */
--- 295,306 ----
    || defined (__MACHTEN__)
  #include <termios.h>
  
! #else
! #if defined (VMS)
  extern char *decc$ga_stdscr;
  static int initted = 0;
  #endif
+ #endif
  
  /* Implements the common processing for getc_immediate and
     getc_immediate_nowait. */
*************** getc_immediate_common (stream, ch, end_o
*** 422,428 ****
      }
  
    else
! #elif defined (VMS)
    int fd = fileno (stream);
  
    if (isatty (fd))
--- 424,431 ----
      }
  
    else
! #else
! #if defined (VMS)
    int fd = fileno (stream);
  
    if (isatty (fd))
*************** getc_immediate_common (stream, ch, end_o
*** 444,450 ****
        decc$bsd_nocbreak ();
      }
    else
! #elif defined (__MINGW32__)
    int fd = fileno (stream);
    int char_waiting;
    int eot_ch = 4; /* Ctrl-D */
--- 447,454 ----
        decc$bsd_nocbreak ();
      }
    else
! #else
! #if defined (__MINGW32__)
    int fd = fileno (stream);
    int char_waiting;
    int eot_ch = 4; /* Ctrl-D */
*************** getc_immediate_common (stream, ch, end_o
*** 487,492 ****
--- 491,498 ----
      }
    else
  #endif
+ #endif
+ #endif
      {
        /* If we're not on a terminal, then we don't need any fancy processing.
  	 Also this is the only thing that's left if we're not on one of the
*************** __gnat_localtime_r (timer, tp)
*** 571,577 ****
    return tp;
  }
  
! #elif defined (__Lynx__)
  
  /* LynxOS provides a non standard localtime_r */
  
--- 577,584 ----
    return tp;
  }
  
! #else
! #if defined (__Lynx__)
  
  /* LynxOS provides a non standard localtime_r */
  
*************** __gnat_localtime_r (timer, tp)
*** 585,591 ****
    return localtime_r (tp, timer);
  }
  
! #elif defined (VMS) || defined (__MINGW32__)
  
  /* __gnat_localtime_r is not needed on NT and VMS */
  
--- 592,599 ----
    return localtime_r (tp, timer);
  }
  
! #else
! #if defined (VMS) || defined (__MINGW32__)
  
  /* __gnat_localtime_r is not needed on NT and VMS */
  
*************** __gnat_localtime_r (timer, tp)
*** 602,605 ****
--- 610,615 ----
  {
    return (struct tm *) localtime_r (timer, tp);
  }
+ #endif
+ #endif
  #endif


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