This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]