aboutsummaryrefslogtreecommitdiff
path: root/gcc/objc/objc-encoding.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/objc/objc-encoding.c')
-rw-r--r--gcc/objc/objc-encoding.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/gcc/objc/objc-encoding.c b/gcc/objc/objc-encoding.c
index 48480213534..9c577e93bae 100644
--- a/gcc/objc/objc-encoding.c
+++ b/gcc/objc/objc-encoding.c
@@ -495,13 +495,14 @@ encode_aggregate_within (tree type, int curtype, int format, int left,
if (flag_next_runtime)
{
- if (ob_size > 0 && *(obstack_next_free (&util_obstack) - 1) == '^')
+ if (ob_size > 0
+ && *((char *) obstack_next_free (&util_obstack) - 1) == '^')
pointed_to = true;
if ((format == OBJC_ENCODE_INLINE_DEFS || generating_instance_variables)
&& (!pointed_to || ob_size - curtype == 1
|| (ob_size - curtype == 2
- && *(obstack_next_free (&util_obstack) - 2) == 'r')))
+ && *((char *) obstack_next_free (&util_obstack) - 2) == 'r')))
inline_contents = true;
}
else
@@ -512,9 +513,10 @@ encode_aggregate_within (tree type, int curtype, int format, int left,
comment above applies: in that case we should avoid encoding
the names of instance variables.
*/
- char c1 = ob_size > 1 ? *(obstack_next_free (&util_obstack) - 2) : 0;
- char c0 = ob_size > 0 ? *(obstack_next_free (&util_obstack) - 1) : 0;
+ char c0, c1;
+ c1 = ob_size > 1 ? *((char *) obstack_next_free (&util_obstack) - 2) : 0;
+ c0 = ob_size > 0 ? *((char *) obstack_next_free (&util_obstack) - 1) : 0;
if (c0 == '^' || (c1 == '^' && c0 == 'r'))
pointed_to = true;