diff options
author | Andrew Pinski <pinskia@physics.uc.edu> | 2005-12-11 06:28:35 +0000 |
---|---|---|
committer | Andrew Pinski <pinskia@gcc.gnu.org> | 2005-12-10 22:28:35 -0800 |
commit | 153b4898d243846931a06682cd06ce16b826d755 (patch) | |
tree | 420342e937a38ecbfb6c217f8abd0a9f255e7a29 /libobjc/encoding.c | |
parent | b91365538ab86873619628d4f8e2ea692ea5b212 (diff) | |
download | gcc-153b4898d243846931a06682cd06ce16b826d755.zip gcc-153b4898d243846931a06682cd06ce16b826d755.tar.gz gcc-153b4898d243846931a06682cd06ce16b826d755.tar.bz2 |
re PR libobjc/25346 (objc_sizeof_type does not handle _Bool at all)
2005-12-11 Andrew Pinski <pinskia@physics.uc.edu>
PR libobjc/25346
* objc/objc-api.h (_C_BOOL): New define.
* encoding.c (objc_sizeof_type): Handle _C_BOOL.
(objc_alignof_type): Likewise.
(objc_skip_typespec): Likewise.
2005-12-11 Andrew Pinski <pinskia@physics.uc.edu>
PR libobjc/25346
* objc.dg/encode-7.m: New test.
From-SVN: r108378
Diffstat (limited to 'libobjc/encoding.c')
-rw-r--r-- | libobjc/encoding.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libobjc/encoding.c b/libobjc/encoding.c index efdc2f0..7f6004f 100644 --- a/libobjc/encoding.c +++ b/libobjc/encoding.c @@ -123,6 +123,10 @@ objc_sizeof_type (const char *type) } switch (*type) { + case _C_BOOL: + return sizeof (_Bool); + break; + case _C_ID: return sizeof (id); break; @@ -273,6 +277,10 @@ objc_alignof_type (const char *type) /* do nothing */; } switch (*type) { + case _C_BOOL: + return __alignof__ (_Bool); + break; + case _C_ID: return __alignof__ (id); break; @@ -496,6 +504,7 @@ objc_skip_typespec (const char *type) case _C_INT: case _C_UINT: case _C_LNG: + case _C_BOOL: case _C_ULNG: case _C_LNG_LNG: case _C_ULNG_LNG: |