diff options
author | aj <aj@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-06-09 16:46:01 +0000 |
---|---|---|
committer | aj <aj@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-06-09 16:46:01 +0000 |
commit | 5564b88ad1ce27f018acda5e8aa5e4080c51a500 (patch) | |
tree | 0870f4bc447c6af738fddcf700a7884399a07b39 /libobjc/encoding.c | |
parent | 72943b59f4ef66e96a425b1949da04c53b45ef93 (diff) | |
download | gcc-5564b88ad1ce27f018acda5e8aa5e4080c51a500.tar.gz |
* encoding.c (objc_layout_structure_next_member): Remove unused
variable.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@54406 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libobjc/encoding.c')
-rw-r--r-- | libobjc/encoding.c | 64 |
1 files changed, 32 insertions, 32 deletions
diff --git a/libobjc/encoding.c b/libobjc/encoding.c index 39277235b1f..b30626f4135 100644 --- a/libobjc/encoding.c +++ b/libobjc/encoding.c @@ -1,5 +1,6 @@ /* Encoding of types for Objective C. - Copyright (C) 1993, 1995, 1996, 1997, 1998, 2000 Free Software Foundation, Inc. + Copyright (C) 1993, 1995, 1996, 1997, 1998, 2000, 2002 + Free Software Foundation, Inc. Contributed by Kresten Krab Thorup Bitfield support by Ovidiu Predescu @@ -85,7 +86,7 @@ static inline int atoi (const char* str) { int res = 0; - + while (isdigit (*str)) res *= 10, res += (*str++ - '0'); @@ -93,7 +94,7 @@ atoi (const char* str) } /* - return the size of an object specified by type + return the size of an object specified by type */ int @@ -122,7 +123,7 @@ objc_sizeof_type (const char* type) case _C_CHR: return sizeof(char); break; - + case _C_UCHR: return sizeof(unsigned char); break; @@ -182,7 +183,7 @@ objc_sizeof_type (const char* type) while (isdigit(*++type)); return len*objc_aligned_size (type); } - break; + break; case _C_BFLD: { @@ -229,7 +230,7 @@ objc_sizeof_type (const char* type) } return max_size; } - + default: { objc_error(nil, OBJC_ERR_BAD_TYPE, "unknown type %s\n", type); @@ -240,7 +241,7 @@ objc_sizeof_type (const char* type) /* - Return the alignment of an object specified by type + Return the alignment of an object specified by type */ int @@ -260,7 +261,7 @@ objc_alignof_type(const char* type) case _C_CLASS: return __alignof__(Class); break; - + case _C_SEL: return __alignof__(SEL); break; @@ -268,7 +269,7 @@ objc_alignof_type(const char* type) case _C_CHR: return __alignof__(char); break; - + case _C_UCHR: return __alignof__(unsigned char); break; @@ -389,7 +390,7 @@ objc_aligned_size (const char* type) to be the size of a void*. */ -int +int objc_promoted_size (const char* type) { int size, wordsize; @@ -416,9 +417,9 @@ inline const char* objc_skip_type_qualifiers (const char* type) { while (*type == _C_CONST - || *type == _C_IN + || *type == _C_IN || *type == _C_INOUT - || *type == _C_OUT + || *type == _C_OUT || *type == _C_BYCOPY || *type == _C_BYREF || *type == _C_ONEWAY @@ -429,13 +430,13 @@ objc_skip_type_qualifiers (const char* type) return type; } - + /* Skip one typespec element. If the typespec is prepended by type qualifiers, these are skipped as well. */ -const char* +const char* objc_skip_typespec (const char* type) { /* Skip the variable name if any */ @@ -446,7 +447,7 @@ objc_skip_typespec (const char* type) } type = objc_skip_type_qualifiers (type); - + switch (*type) { case _C_ID: @@ -485,7 +486,7 @@ objc_skip_typespec (const char* type) case _C_ARY_B: /* skip digits, typespec and closing ']' */ - + while(isdigit(*++type)); type = objc_skip_typespec(type); if (*type == _C_ARY_E) @@ -504,23 +505,23 @@ objc_skip_typespec (const char* type) case _C_STRUCT_B: /* skip name, and elements until closing '}' */ - + while (*type != _C_STRUCT_E && *type++ != '='); while (*type != _C_STRUCT_E) { type = objc_skip_typespec (type); } return ++type; case _C_UNION_B: /* skip name, and elements until closing ')' */ - + while (*type != _C_UNION_E && *type++ != '='); while (*type != _C_UNION_E) { type = objc_skip_typespec (type); } return ++type; case _C_PTR: /* Just skip the following typespec */ - + return objc_skip_typespec (++type); - + default: { objc_error(nil, OBJC_ERR_BAD_TYPE, "unknown type %s\n", type); @@ -533,7 +534,7 @@ objc_skip_typespec (const char* type) Skip an offset as part of a method encoding. This is prepended by a '+' if the argument is passed in registers. */ -inline const char* +inline const char* objc_skip_offset (const char* type) { if (*type == '+') type++; @@ -555,7 +556,7 @@ objc_skip_argspec (const char* type) /* Return the number of arguments that the method MTH expects. Note that all methods need two implicit arguments `self' and - `_cmd'. + `_cmd'. */ int method_get_number_of_arguments (struct objc_method* mth) @@ -588,7 +589,7 @@ method_get_sizeof_arguments (struct objc_method* mth) the last argument. Typical use of this look like: { - char *datum, *type; + char *datum, *type; for (datum = method_get_first_argument (method, argframe, &type); datum; datum = method_get_next_argument (argframe, &type)) { @@ -603,7 +604,7 @@ method_get_sizeof_arguments (struct objc_method* mth) } } } -*/ +*/ char* method_get_next_argument (arglist_t argframe, @@ -624,14 +625,14 @@ method_get_next_argument (arglist_t argframe, } /* - Return a pointer to the value of the first argument of the method + Return a pointer to the value of the first argument of the method described in M with the given argumentframe ARGFRAME. The type - is returned in TYPE. type must be passed to successive calls of + is returned in TYPE. type must be passed to successive calls of method_get_next_argument. */ char* method_get_first_argument (struct objc_method* m, - arglist_t argframe, + arglist_t argframe, const char** type) { *type = m->method_types; @@ -641,12 +642,12 @@ method_get_first_argument (struct objc_method* m, /* Return a pointer to the ARGth argument of the method M from the frame ARGFRAME. The type of the argument - is returned in the value-result argument TYPE + is returned in the value-result argument TYPE */ char* method_get_nth_argument (struct objc_method* m, - arglist_t argframe, int arg, + arglist_t argframe, int arg, const char **type) { const char* t = objc_skip_argspec (m->method_types); @@ -656,7 +657,7 @@ method_get_nth_argument (struct objc_method* m, while (arg--) t = objc_skip_argspec (t); - + *type = t; t = objc_skip_typespec (t); @@ -749,7 +750,6 @@ objc_layout_structure (const char *type, BOOL objc_layout_structure_next_member (struct objc_struct_layout *layout) { - register int known_align = layout->record_size; register int desired_align = 0; /* The following are used only if the field is a bitfield */ @@ -864,7 +864,7 @@ objc_layout_structure_next_member (struct objc_struct_layout *layout) Bump the cumulative size to multiple of field alignment. */ layout->record_size = ROUND (layout->record_size, desired_align); } - + /* Jump to the next field in record. */ layout->prev_type = layout->type; |