This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Warning patrol for stor-layout.c
- From: Andreas Schwab <schwab at suse dot de>
- To: gcc-patches at gcc dot gnu dot org
- Date: Wed, 22 Jan 2003 15:15:43 +0100
- Subject: Warning patrol for stor-layout.c
excess_unit_span is only used if PCC_BITFIELD_TYPE_MATTERS or
BITFIELD_NBYTES_LIMITED are defined.
Andreas.
2003-01-22 Andreas Schwab <schwab@suse.de>
* stor-layout.c (excess_unit_span): Only define if used.
--- stor-layout.c.~1.141.~ 2003-01-17 09:47:04.000000000 +0100
+++ stor-layout.c 2003-01-22 15:14:55.000000000 +0100
@@ -1,6 +1,6 @@
/* C-compiler utilities for types and variables storage layout
Copyright (C) 1987, 1988, 1992, 1993, 1994, 1995, 1996, 1996, 1998,
- 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+ 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
This file is part of GCC.
@@ -62,9 +62,11 @@ static int reference_types_internal = 0;
static void finalize_record_size PARAMS ((record_layout_info));
static void finalize_type_size PARAMS ((tree));
static void place_union_field PARAMS ((record_layout_info, tree));
+#if defined (PCC_BITFIELD_TYPE_MATTERS) || defined (BITFIELD_NBYTES_LIMITED)
static int excess_unit_span PARAMS ((HOST_WIDE_INT, HOST_WIDE_INT,
HOST_WIDE_INT, HOST_WIDE_INT,
tree));
+#endif
static unsigned int update_alignment_for_field
PARAMS ((record_layout_info, tree,
unsigned int));
@@ -791,6 +793,7 @@ place_union_field (rli, field)
DECL_SIZE_UNIT (field), rli->offset));
}
+#if defined (PCC_BITFIELD_TYPE_MATTERS) || defined (BITFIELD_NBYTES_LIMITED)
/* A bitfield of SIZE with a required access alignment of ALIGN is allocated
at BYTE_OFFSET / BIT_OFFSET. Return nonzero if the field would span more
units of alignment than the underlying TYPE. */
@@ -808,6 +811,7 @@ excess_unit_span (byte_offset, bit_offse
> ((unsigned HOST_WIDE_INT) tree_low_cst (TYPE_SIZE (type), 1)
/ align));
}
+#endif
/* RLI contains information about the layout of a RECORD_TYPE. FIELD
is a FIELD_DECL to be added after those fields already present in
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."