This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/28902] New: Fix for "alingment of XXX is greater than maximum object alignment" on AVR
- From: "ramagnus at t-online dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 30 Aug 2006 12:47:12 -0000
- Subject: [Bug target/28902] New: Fix for "alingment of XXX is greater than maximum object alignment" on AVR
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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