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]

RE: [patch objc]: Fix issue about LLP64 and -Wpadded


Kai,

it's not entirely obvious to me that this patch is safe. ;-)

The declaration in the libobjc headers is used to access structures that
are actually generated by the compiler when compiling an Objective-C
module (see gcc/objc/objc-act.c, build_class_template()).

If you change the declaration of the structure in libobjc (and assuming the
change actually does something), wouldn't you need to change the compiler 
as well ?

But changing the layout of struct objc_class generated by the compiler would
break the ABI (and would break it seriously, it's not a detail), which is a pain 
if it means you can't use GCC 4.6 for Objective-C if anything Objective-C on your 
machine has been ever compiled by an older GCC.

I'd say when we change the Objective-C ABI to implement Objective-C 2.0 features 
(most likely in the next release of the compiler) we could address padding of structures
as part of the change. ;-)

But maybe I'm misunderstanding your patch.  Feel free to explain it and point out
anything I may have missed :-)

Thanks

-----Original Message-----
From: "Kai Tietz" <Kai.Tietz@onevision.com>
Sent: Wednesday, 29 September, 2010 17:26
To: gcc-patches@gcc.gnu.org
Subject: [patch objc]: Fix issue about LLP64 and -Wpadded

Hello,

This patch adds to objc_class structure a padding for windows 64-bit case.

ChangeLog libobjc/

2010-09-29  Kai Tietz

        * objc/deprecated/struct_objc_class.h: Add padding
        to avoid warning with -Wpadded.

Tested for x86_64-pc-mingw32, and i686-pc-cygwin. Ok for apply?

Regards,
 i.A. Kai Tietz

|  (\_/)  This is Bunny. Copy and paste Bunny
| (='.'=) into your signature to help him gain
| (")_(") world domination.




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