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]
Other format: [Raw text]

Eliminate Ada -Werror overrides


Howdy,

-Werror is overridden for two files in ada/Make-lang.in.
b_gnatb.o generates an unused variable warning which I silenced
with __attribute__ ((__unused__)), and there was no warning for
tracebak.o.

I bootstrapped the following patch on powerpc-unknown-linux-gnu.
OK to commit?

-- 
Matt Kraai <kraai@alumni.cmu.edu>
Debian GNU/Linux Peon

	* Make-lang.in (ada/tracebak.o-warn, ada/b_gnatb.o-warn):
	Remove.
	* bindgen.adb (Gen_Main_C): Mark ensure_reference with
	__attribute__ ((__unused__)).

Index: gcc/ada/Make-lang.in
===================================================================
RCS file: /cvs/gcc/gcc/gcc/ada/Make-lang.in,v
retrieving revision 1.30
diff -3 -c -p -r1.30 Make-lang.in
*** gcc/ada/Make-lang.in	5 Jun 2003 16:36:06 -0000	1.30
--- gcc/ada/Make-lang.in	6 Jun 2003 03:36:28 -0000
*************** ADA_FLAGS_TO_PASS = \
*** 84,92 ****
  # FIXME: need to add $(ALL_ADA_CFLAGS) to .c.o suffix rule
  # Use loose warnings for this front end, but add some special flags
  ada-warn = $(ALL_ADA_CFLAGS) $(WERROR)
- # unresolved warnings in a couple of files
- ada/tracebak.o-warn = -Wno-error
- ada/b_gnatb.o-warn = -Wno-error
  
  .adb.o:
  	$(ADAC) -c $(ALL_ADAFLAGS) $(ADA_INCLUDES) $< $(OUTPUT_OPTION)
--- 84,89 ----
Index: gcc/ada/bindgen.adb
===================================================================
RCS file: /cvs/gcc/gcc/gcc/ada/bindgen.adb,v
retrieving revision 1.11
diff -3 -c -p -r1.11 bindgen.adb
*** gcc/ada/bindgen.adb	5 Jun 2003 07:11:39 -0000	1.11
--- gcc/ada/bindgen.adb	6 Jun 2003 03:36:36 -0000
*************** package body Bindgen is
*** 1367,1373 ****
           --  optimized away by smart linkers, such as the AiX linker.
  
           if Bind_Main_Program then
!             WBI ("   char *ensure_reference = __gnat_ada_main_program_name;");
              WBI ("");
           end if;
  
--- 1367,1375 ----
           --  optimized away by smart linkers, such as the AiX linker.
  
           if Bind_Main_Program then
!             WBI
!               ("   char *ensure_reference __attribute__ ((__unused__)) = " &
!                "__gnat_ada_main_program_name;");
              WBI ("");
           end if;
  


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