This is the mail archive of the binutils@sourceware.org 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: Fix conditional compilation of tc-alpha.c


Hi Guys,

  I am applying the patch below to fix the compilation of tc-alpha.c
  for a non-ELF and non-VAX target.  (Specifically in this case
  alpha-osf4.0).  The problem was that a few variables were being
  defined for all Alpha targets but only used by a few of them, and so
  this was generating warning messages from gcc.

Cheers
  Nick

gas/ChangeLog
2009-03-04  Nick Clifton  <nickc@redhat.com>

	* config/tc-alpha.c (alpha_prologue_label): Only define for ELF
	based targets.
	(s_alpha_comm): Only define "temp" and "log_align" local variables
	for EVAX targets.  

Index: gas/config/tc-alpha.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-alpha.c,v
retrieving revision 1.79
diff -c -3 -p -r1.79 tc-alpha.c
*** gas/config/tc-alpha.c	3 Mar 2009 10:04:58 -0000	1.79
--- gas/config/tc-alpha.c	4 Mar 2009 16:03:53 -0000
*************** static int alpha_addr32_on = 0;
*** 355,361 ****
--- 355,363 ----
     and the section happens to not be on an eight byte boundary, it
     will align both the symbol and the .quad to an eight byte boundary.  */
  static symbolS *alpha_insn_label;
+ #ifdef OBJ_ELF
  static symbolS *alpha_prologue_label;
+ #endif
  
  #ifdef OBJ_EVAX
  /* Symbol associate with the current jsr instruction.  */
*************** s_alpha_comm (int ignore ATTRIBUTE_UNUSE
*** 3473,3481 ****
    char *name;
    char c;
    char *p;
!   offsetT temp, size;
    symbolS *symbolP;
    int log_align = 0;
  
    name = input_line_pointer;
    c = get_symbol_end ();
--- 3475,3486 ----
    char *name;
    char c;
    char *p;
!   offsetT size;
    symbolS *symbolP;
+ #ifdef OBJ_EVAX
+   offsetT temp;
    int log_align = 0;
+ #endif
  
    name = input_line_pointer;
    c = get_symbol_end ();


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