This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils 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]

[committed] gas warning fixes for som architecture


The enclosed patch fixes a number of warnings building with gcc 3.4.
Tested on hppa1.1.-hp-hpux10.20.

Dave
-- 
J. David Anglin                                  dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6602)

2004-07-19  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>

	* config/obj-som.c (adjust_stab_sections): Add prototype.
	(obj_som_compiler, obj_som_version, obj_som_copyright,
	adjust_stab_sections): Add ATTRIBUTE_UNUSED to unused arguments.
	* config/tc-hppa.c (update_subspace):  Likewise.
	(is_defined_subspace): Amplify comment.
	* config/obj-som.h (som_frob_file): Add prototype.

Index: config/obj-som.c
===================================================================
RCS file: /cvs/src/src/gas/config/obj-som.c,v
retrieving revision 1.8
diff -u -3 -p -r1.8 obj-som.c
--- config/obj-som.c	28 Apr 2004 18:02:49 -0000	1.8
+++ config/obj-som.c	19 Jul 2004 20:14:03 -0000
@@ -27,6 +27,7 @@
 #include "obstack.h"
 
 static void obj_som_weak PARAMS ((int));
+static void adjust_stab_sections PARAMS ((bfd *, asection *, PTR));
 
 const pseudo_typeS obj_pseudo_table[] =
 {
@@ -52,7 +53,7 @@ obj_read_begin_hook ()
 
 void
 obj_som_compiler (unused)
-     int unused;
+     int unused ATTRIBUTE_UNUSED;
 {
   char *buf;
   char c;
@@ -129,7 +130,7 @@ obj_som_compiler (unused)
 
 void
 obj_som_version (unused)
-     int unused;
+     int unused ATTRIBUTE_UNUSED;
 {
   char *version, c;
 
@@ -175,7 +176,7 @@ obj_som_version (unused)
 
 void
 obj_som_copyright (unused)
-     int unused;
+     int unused ATTRIBUTE_UNUSED;
 {
   char *copyright, c;
 
@@ -283,7 +284,7 @@ static void
 adjust_stab_sections (abfd, sec, xxx)
      bfd *abfd;
      asection *sec;
-     PTR xxx;
+     PTR xxx ATTRIBUTE_UNUSED;
 {
   asection *strsec;
   char *p;
Index: config/obj-som.h
===================================================================
RCS file: /cvs/src/src/gas/config/obj-som.h,v
retrieving revision 1.4
diff -u -3 -p -r1.4 obj-som.h
--- config/obj-som.h	8 Mar 2001 23:24:22 -0000	1.4
+++ config/obj-som.h	19 Jul 2004 20:14:03 -0000
@@ -39,6 +39,7 @@
 #define som_symbol(asymbol) ((som_symbol_type *) (&(asymbol)->the_bfd))
 
 extern void som_file_symbol PARAMS ((char *));
+extern void som_frob_file PARAMS ((void));
 extern void obj_som_version PARAMS ((int));
 extern void obj_som_init_stab_section PARAMS ((segT));
 extern void obj_som_copyright PARAMS ((int));
Index: config/tc-hppa.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-hppa.c,v
retrieving revision 1.113
diff -u -3 -p -r1.113 tc-hppa.c
--- config/tc-hppa.c	11 Jun 2004 17:39:18 -0000	1.113
+++ config/tc-hppa.c	19 Jul 2004 20:14:04 -0000
@@ -7982,16 +7982,16 @@ update_subspace (space, name, loadable, 
 		 sort, zero, access, space_index, alignment, quadrant, section)
      sd_chain_struct *space;
      char *name;
-     int loadable;
-     int code_only;
+     int loadable ATTRIBUTE_UNUSED;
+     int code_only ATTRIBUTE_UNUSED;
      int comdat;
      int common;
      int dup_common;
-     int zero;
+     int zero ATTRIBUTE_UNUSED;
      int sort;
      int access;
-     int space_index;
-     int alignment;
+     int space_index ATTRIBUTE_UNUSED;
+     int alignment ATTRIBUTE_UNUSED;
      int quadrant;
      asection *section;
 {
@@ -8053,9 +8053,14 @@ pa_segment_to_space (seg)
   return NULL;
 }
 
-/* Return the space chain entry for the subspace with the name NAME or
-   NULL if no such subspace exists.
+/* Return the first space chain entry for the subspace with the name
+   NAME or NULL if no such subspace exists.
 
+   When there are multiple subspaces with the same name, switching to
+   the first (i.e., default) subspace is preferable in most situations.
+   For example, it wouldn't be desirable to merge COMDAT data with non
+   COMDAT data.
+    
    Uses a linear search through all the spaces and subspaces, this may
    not be appropriate if we ever being placing each function in its
    own subspace.  */


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