aboutsummaryrefslogtreecommitdiff
path: root/libobjc
diff options
context:
space:
mode:
authoraj <aj@138bc75d-0d04-0410-961f-82ee72b054a4>2002-06-09 16:46:01 +0000
committeraj <aj@138bc75d-0d04-0410-961f-82ee72b054a4>2002-06-09 16:46:01 +0000
commit5564b88ad1ce27f018acda5e8aa5e4080c51a500 (patch)
tree0870f4bc447c6af738fddcf700a7884399a07b39 /libobjc
parent72943b59f4ef66e96a425b1949da04c53b45ef93 (diff)
* 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')
-rw-r--r--libobjc/ChangeLog16
-rw-r--r--libobjc/encoding.c64
2 files changed, 42 insertions, 38 deletions
diff --git a/libobjc/ChangeLog b/libobjc/ChangeLog
index d28d8a1d2ec..a43812aa309 100644
--- a/libobjc/ChangeLog
+++ b/libobjc/ChangeLog
@@ -1,3 +1,8 @@
+2002-06-09 Andreas Jaeger <aj@suse.de>
+
+ * encoding.c (objc_layout_structure_next_member): Remove unused
+ variable.
+
2002-05-20 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* Makefile.in (SHELL): Set to @SHELL@.
@@ -181,14 +186,14 @@ Wed Jan 3 00:49:10 2001 Ovidiu Predescu <ovidiu@cup.hp.com>
function. This can alleviate problems __builtin_apply() and
friends have on various platforms. (Solution suggested by Helge
Hess.)
-
+
* objc/objc-api.h: Define __objc_msg_forward.
* sendmsg.c: Define gen_rtx_REG.
2000-12-06 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
- * thr-rtems.c: New file. Stub to compile.
+ * thr-rtems.c: New file. Stub to compile.
2000-09-06 Alexandre Oliva <aoliva@redhat.com>
@@ -230,7 +235,7 @@ Sun Aug 6 22:51:16 2000 Ovidiu Predescu <ovidiu@cup.hp.com>
Fri Jul 28 08:58:02 2000 Nicola Pero <nicola@brainstorm.co.uk>
- * configure.in: Added libtool support; build shared libraries
+ * configure.in: Added libtool support; build shared libraries
if --enable-shared was passed on command line.
* Makefile.in: Modified most compilation commands to use libtool.
* aclocal.m4: New symbolic link to the ../libtool.m4, from the
@@ -291,7 +296,7 @@ Tue Sep 21 07:47:10 1999 Jeffrey A Law (law@cygnus.com)
* Makefile.in (gc.o, gc_gc.o): Do not pass -fgnu-runtime to
the compiler when building C code.
-
+
Fri Aug 6 23:32:29 1999 Daniel Jacobowitz <drow@drow.them.org>
* Makefile.in (FLAGS_TO_PASS): Include prefix, exec_prefix,
@@ -370,7 +375,7 @@ Sat Oct 17 05:21:31 1998 Ovidiu Predescu <ovidiu@slip.net>
Mon Oct 11 21:25:27 1998 Ovidiu Predescu <ovidiu@slip.net>
* encoding.c: Redefine get_inner_array_type to get the first entry
- in the structure.
+ in the structure.
Thu Oct 8 12:21:14 1998 Richard Frith-Macdonald <richard@brainstorm.co.uk>
@@ -435,4 +440,3 @@ Mon Sep 21 23:27:10 1998 Ovidiu Predescu <ovidiu@slip.net>
1998-09-21 Ben Elliston <bje@cygnus.com>
* New directory. Moved files from ../gcc/objc.
-
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;