[Bug target/28902] New: Fix for "alingment of XXX is greater than maximum object alignment" on AVR
ramagnus at t-online dot de
gcc-bugzilla@gcc.gnu.org
Wed Aug 30 12:47:00 GMT 2006
The avr target gives that alignment warning for every polymorphic class,
because it doesn't define TARGET_VTABLE_ENTRY_ALIGN, which means the default
kicks in, which is the size of a pointer. Since the AVR as an 8 bit platform
has no alignment requirements, BIGGEST_ALIGNMENT is 8, which is less than the
pointer size. The fix is trivial. A patch against trunk follows:
Index: gcc/config/avr/avr.h
===================================================================
--- gcc/config/avr/avr.h (revision 116509)
+++ gcc/config/avr/avr.h (working copy)
@@ -94,6 +94,7 @@
/* No data type wants to be aligned rounder than this. */
#define BIGGEST_ALIGNMENT 8
+#define TARGET_VTABLE_ENTRY_ALIGN 8
#define STRICT_ALIGNMENT 0
--
Summary: Fix for "alingment of XXX is greater than maximum object
alignment" on AVR
Product: gcc
Version: 4.2.0
Status: UNCONFIRMED
Severity: trivial
Priority: P3
Component: target
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: ramagnus at t-online dot de
GCC build triplet: *-*-*
GCC host triplet: *-*-*
GCC target triplet: avr-unknown-none
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28902
More information about the Gcc-bugs
mailing list