mirror of git://gcc.gnu.org/git/gcc.git
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
This commit is contained in:
parent
b91365538a
commit
153b4898d2
|
|
@ -1,3 +1,8 @@
|
||||||
|
2005-12-11 Andrew Pinski <pinskia@physics.uc.edu>
|
||||||
|
|
||||||
|
PR libobjc/25346
|
||||||
|
* objc.dg/encode-7.m: New test.
|
||||||
|
|
||||||
2005-12-10 Mark Mitchell <mark@codesourcery.com>
|
2005-12-10 Mark Mitchell <mark@codesourcery.com>
|
||||||
|
|
||||||
PR c++/25010
|
PR c++/25010
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
/* { dg-options "-fgnu-runtime" } */
|
||||||
|
/* { dg-do run } */
|
||||||
|
|
||||||
|
#include <objc/encoding.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
struct f
|
||||||
|
{
|
||||||
|
_Bool a;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
int main(void)
|
||||||
|
{
|
||||||
|
if (objc_sizeof_type (@encode (struct f)) != sizeof(struct f))
|
||||||
|
abort ();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
@ -1,3 +1,11 @@
|
||||||
|
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-11-20 David Ayers <d.ayers@inode.at>
|
2005-11-20 David Ayers <d.ayers@inode.at>
|
||||||
|
|
||||||
PR libobjc/19024
|
PR libobjc/19024
|
||||||
|
|
|
||||||
|
|
@ -123,6 +123,10 @@ objc_sizeof_type (const char *type)
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (*type) {
|
switch (*type) {
|
||||||
|
case _C_BOOL:
|
||||||
|
return sizeof (_Bool);
|
||||||
|
break;
|
||||||
|
|
||||||
case _C_ID:
|
case _C_ID:
|
||||||
return sizeof (id);
|
return sizeof (id);
|
||||||
break;
|
break;
|
||||||
|
|
@ -273,6 +277,10 @@ objc_alignof_type (const char *type)
|
||||||
/* do nothing */;
|
/* do nothing */;
|
||||||
}
|
}
|
||||||
switch (*type) {
|
switch (*type) {
|
||||||
|
case _C_BOOL:
|
||||||
|
return __alignof__ (_Bool);
|
||||||
|
break;
|
||||||
|
|
||||||
case _C_ID:
|
case _C_ID:
|
||||||
return __alignof__ (id);
|
return __alignof__ (id);
|
||||||
break;
|
break;
|
||||||
|
|
@ -496,6 +504,7 @@ objc_skip_typespec (const char *type)
|
||||||
case _C_INT:
|
case _C_INT:
|
||||||
case _C_UINT:
|
case _C_UINT:
|
||||||
case _C_LNG:
|
case _C_LNG:
|
||||||
|
case _C_BOOL:
|
||||||
case _C_ULNG:
|
case _C_ULNG:
|
||||||
case _C_LNG_LNG:
|
case _C_LNG_LNG:
|
||||||
case _C_ULNG_LNG:
|
case _C_ULNG_LNG:
|
||||||
|
|
|
||||||
|
|
@ -69,6 +69,7 @@ struct objc_method_description
|
||||||
#define _C_FLT 'f'
|
#define _C_FLT 'f'
|
||||||
#define _C_DBL 'd'
|
#define _C_DBL 'd'
|
||||||
#define _C_BFLD 'b'
|
#define _C_BFLD 'b'
|
||||||
|
#define _C_BOOL 'B'
|
||||||
#define _C_VOID 'v'
|
#define _C_VOID 'v'
|
||||||
#define _C_UNDEF '?'
|
#define _C_UNDEF '?'
|
||||||
#define _C_PTR '^'
|
#define _C_PTR '^'
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue