This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[AVR][committed] Fix target/28902
- From: "Anatoly Sokolov" <aesok at post dot ru>
- To: <gcc-patches at gcc dot gnu dot org>
- Cc: <aesok at post dot ru>
- Date: Tue, 4 Sep 2007 00:28:13 +0400
- Subject: [AVR][committed] Fix target/28902
Hi.
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.
2007-09-03 Anatoly Sokolov <aesok@post.ru>
PR target/28902
* config/avr/avr.h (TARGET_VTABLE_ENTRY_ALIGN): Define.
Index: gcc/config/avr/avr.h
===================================================================
--- gcc/config/avr/avr.h (revision 128057)
+++ gcc/config/avr/avr.h (working copy)
@@ -99,6 +99,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
Anatoly.