diff mbox

[buildrobot] PR59496: Fix unused variable warning

Message ID 1DD4818C-CD4A-4CB4-9F37-DD53DF64EF5C@codesourcery.com
State New
Headers show

Commit Message

Iain Sandoe Jan. 20, 2014, 11:24 a.m. UTC
On 20 Jan 2014, at 08:45, Jakub Jelinek wrote:

> On Tue, Jan 14, 2014 at 05:59:11PM +0100, Jan-Benedict Glaw wrote:
>> 2014-01-14  Jan-Benedict Glaw  <jbglaw@lug-owl.de>
>> 
>> 	PR bootstrap/59496
>> 	* config/rs6000/darwin.h (ADJUST_FIELD_ALIGN): Fix unused variable
>> 	warning.
> 
> Ok, thanks.

As discussed on irc, I have applied a slightly modified version (differs in whitespace and amends the comment to explain the dummy use of FIELD).
Iain

r206802:
diff mbox

Patch

Index: gcc/ChangeLog
===================================================================
--- gcc/ChangeLog	(revision 206801)
+++ gcc/ChangeLog	(working copy)
@@ -1,3 +1,10 @@ 
+2014-01-20  Jan-Benedict Glaw  <jbglaw@lug-owl.de>
+	    Iain Sandoe  <iain@codesourcery.com>
+
+	PR bootstrap/59496
+	* config/rs6000/darwin.h (ADJUST_FIELD_ALIGN): Fix unused variable
+	warning.  Amend comment to reflect current functionality.
+
 2014-01-20  Richard Biener  <rguenther@suse.de>
 
 	PR middle-end/59860
Index: gcc/config/rs6000/darwin.h
===================================================================
--- gcc/config/rs6000/darwin.h	(revision 206801)
+++ gcc/config/rs6000/darwin.h	(working copy)
@@ -321,16 +321,19 @@ 
    ? GENERAL_REGS						\
    : (CLASS))
 
-/* Compute field alignment.  This is similar to the version of the
-   macro in the Apple version of GCC, except that version supports
-   'mac68k' alignment, and that version uses the computed alignment
-   always for the first field of a structure.  The first-field
-   behavior is dealt with by
-   darwin_rs6000_special_round_type_align.  */
-#define ADJUST_FIELD_ALIGN(FIELD, COMPUTED)	\
-  (TARGET_ALIGN_NATURAL ? (COMPUTED)		\
-   : (COMPUTED) == 128 ? 128			\
-   : MIN ((COMPUTED), 32))
+/* Compute field alignment.
+   This implements the 'power' alignment rule by pegging the alignment of
+   items (beyond the first aggregate field) to 32 bits.  The pegging is
+   suppressed for vector and long double items (both 128 in size).
+   There is a dummy use of the FIELD argument to avoid an unused variable
+   warning (see PR59496).  */
+#define ADJUST_FIELD_ALIGN(FIELD, COMPUTED)			\
+  ((void) (FIELD),						\
+    (TARGET_ALIGN_NATURAL					\
+     ? (COMPUTED)						\
+     : (COMPUTED) == 128					\
+	? 128							\
+	: MIN ((COMPUTED), 32)))
 
 /* Darwin increases natural record alignment to doubleword if the first
    field is an FP double while the FP fields remain word aligned.  */