* Get rid of lvalue casts etc.
@ 2004-01-22 11:13 Andreas Jaeger
2004-01-22 13:24 ` Andreas Schwab
0 siblings, 1 reply; 5+ messages in thread
From: Andreas Jaeger @ 2004-01-22 11:13 UTC (permalink / raw)
To: GNU libc hackers
[-- Attachment #1.1: Type: text/plain, Size: 453 bytes --]
GCC 3.4 has removed the support for casts as lvalues. :-(
I'm appending a tested patch for glibc that fixes some of the
problems.
Ok to commit?
Andreas
2004-01-22 Andreas Jaeger <aj@suse.de>
* iconv/gconv_simple.c (ucs4le_internal_loop): Remove cast used as
lvalue.
(internal_ucs4le_loop_single): Likewise.
(ucs4_internal_loop): Likewise.
(BODY): Likewise.
* iconv/gconv_open.c (__gconv_open): Remove conditional expression
as lvalue.
[-- Attachment #1.2: libc-diff --]
[-- Type: text/plain, Size: 5700 bytes --]
============================================================
Index: iconv/gconv_simple.c
--- iconv/gconv_simple.c 11 Jun 2003 21:36:37 -0000 1.59
+++ iconv/gconv_simple.c 22 Jan 2004 11:13:41 -0000
@@ -1,5 +1,5 @@
/* Simple transformations functions.
- Copyright (C) 1997-2002, 2003 Free Software Foundation, Inc.
+ Copyright (C) 1997-2003, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -87,10 +87,12 @@ internal_ucs4_loop (struct __gconv_step
#if __BYTE_ORDER == __LITTLE_ENDIAN
/* Sigh, we have to do some real work. */
size_t cnt;
-
+ uint32_t *outptr32 = (uint32_t *) outptr;
+
for (cnt = 0; cnt < n_convert; ++cnt, inptr += 4)
- *((uint32_t *) outptr)++ = bswap_32 (*(const uint32_t *) inptr);
-
+ *outptr32++ = bswap_32 (*(const uint32_t *) inptr);
+ outptr = (unsigned char *) outptr32;
+
*inptrp = inptr;
*outptrp = outptr;
#elif __BYTE_ORDER == __BIG_ENDIAN
@@ -195,7 +197,8 @@ internal_ucs4_loop_single (struct __gcon
*outptrp += 4;
#elif __BYTE_ORDER == __BIG_ENDIAN
/* XXX unaligned */
- *(*((uint32_t **) outptrp)++) = state->__value.__wch;
+ *(*((uint32_t **) outptrp)) = state->__value.__wch;
+ *outptrp += sizeof (uint32_t *);
#else
# error "This endianess is not supported."
#endif
@@ -268,7 +271,8 @@ ucs4_internal_loop (struct __gconv_step
return __GCONV_ILLEGAL_INPUT;
}
- *((uint32_t *) outptr)++ = inval;
+ *((uint32_t *) outptr) = inval;
+ outptr += sizeof (uint32_t);
}
*inptrp = inptr;
@@ -558,7 +562,9 @@ internal_ucs4le_loop_single (struct __gc
*outptrp += 4;
#else
/* XXX unaligned */
- *(*((uint32_t **) outptrp)++) = state->__value.__wch;
+
+ *(*((uint32_t **) outptrp)) = state->__value.__wch;
+ *outptrp += sizeof (uint32_t);
#endif
/* Clear the state buffer. */
@@ -626,7 +632,8 @@ ucs4le_internal_loop (struct __gconv_ste
return __GCONV_ILLEGAL_INPUT;
}
- *((uint32_t *) outptr)++ = inval;
+ *((uint32_t *) outptr) = inval;
+ outptr += sizeof (uint32_t);
}
*inptrp = inptr;
@@ -808,7 +815,8 @@ ucs4le_internal_loop_single (struct __gc
} \
else \
/* It's an one byte sequence. */ \
- *((uint32_t *) outptr)++ = *inptr++; \
+ *((uint32_t *) outptr) = *inptr++; \
+ outptr += sizeof (uint32_t); \
}
#define LOOP_NEED_FLAGS
#include <iconv/loop.c>
@@ -838,7 +846,8 @@ ucs4le_internal_loop_single (struct __gc
} \
else \
/* It's an one byte sequence. */ \
- *outptr++ = *((const uint32_t *) inptr)++; \
+ *outptr++ = *((const uint32_t *) inptr); \
+ inptr += sizeof (uint32_t); \
}
#define LOOP_NEED_FLAGS
#include <iconv/loop.c>
@@ -1032,7 +1041,8 @@ ucs4le_internal_loop_single (struct __gc
} \
\
/* Now adjust the pointers and store the result. */ \
- *((uint32_t *) outptr)++ = ch; \
+ *((uint32_t *) outptr) = ch; \
+ outptr += sizeof (uint32_t); \
}
#define LOOP_NEED_FLAGS
@@ -1153,7 +1163,8 @@ ucs4le_internal_loop_single (struct __gc
STANDARD_FROM_LOOP_ERR_HANDLER (2); \
} \
\
- *((uint32_t *) outptr)++ = u1; \
+ *((uint32_t *) outptr) = u1; \
+ outptr += sizeof (uint32_t); \
inptr += 2; \
}
#define LOOP_NEED_FLAGS
@@ -1201,7 +1212,8 @@ ucs4le_internal_loop_single (struct __gc
} \
else \
{ \
- *((uint16_t *) outptr)++ = val; \
+ *((uint16_t *) outptr) = val; \
+ outptr += sizeof (uint16_t); \
inptr += 4; \
} \
}
@@ -1242,7 +1254,8 @@ ucs4le_internal_loop_single (struct __gc
continue; \
} \
\
- *((uint32_t *) outptr)++ = u1; \
+ *((uint32_t *) outptr) = u1; \
+ outptr += sizeof (uint32_t); \
inptr += 2; \
}
#define LOOP_NEED_FLAGS
@@ -1291,7 +1304,8 @@ ucs4le_internal_loop_single (struct __gc
} \
else \
{ \
- *((uint16_t *) outptr)++ = bswap_16 (val); \
+ *((uint16_t *) outptr) = bswap_16 (val); \
+ outptr += sizeof (uint16_t); \
inptr += 4; \
} \
}
============================================================
Index: iconv/gconv_open.c
--- iconv/gconv_open.c 29 Nov 2001 04:51:58 -0000 1.32
+++ iconv/gconv_open.c 22 Jan 2004 11:13:41 -0000
@@ -1,5 +1,5 @@
/* Find matching transformation algorithms and initialize steps.
- Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1998, 1999, 2000, 2001, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -182,8 +182,13 @@ __gconv_open (const char *toset, const c
|| __builtin_expect (__gconv_translit_find (runp), 0) == 0)
lastp = runp;
else
- /* This means we haven't found the module. Remove it. */
- (lastp == NULL ? trans : lastp->next) = runp->next;
+ {
+ /* This means we haven't found the module. Remove it. */
+ if (lastp == NULL)
+ trans = runp->next;
+ else
+ lastp->next = runp->next;
+ }
}
/* Allocate room for handle. */
[-- Attachment #1.3: Type: text/plain, Size: 190 bytes --]
--
Andreas Jaeger, aj@suse.de, http://www.suse.de/~aj
SuSE Linux AG, Maxfeldstr. 5, 90409 Nürnberg, Germany
GPG fingerprint = 93A3 365E CE47 B889 DF7F FED1 389A 563C C272 A126
[-- Attachment #2: Type: application/pgp-signature, Size: 188 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Get rid of lvalue casts etc.
2004-01-22 11:13 Get rid of lvalue casts etc Andreas Jaeger
@ 2004-01-22 13:24 ` Andreas Schwab
2004-02-07 15:58 ` Andreas Jaeger
0 siblings, 1 reply; 5+ messages in thread
From: Andreas Schwab @ 2004-01-22 13:24 UTC (permalink / raw)
To: Andreas Jaeger; +Cc: GNU libc hackers
Andreas Jaeger <aj@suse.de> writes:
> @@ -195,7 +197,8 @@ internal_ucs4_loop_single (struct __gcon
> *outptrp += 4;
> #elif __BYTE_ORDER == __BIG_ENDIAN
> /* XXX unaligned */
> - *(*((uint32_t **) outptrp)++) = state->__value.__wch;
> + *(*((uint32_t **) outptrp)) = state->__value.__wch;
> + *outptrp += sizeof (uint32_t *);
The big endian version was actually wrong, and sizeof(uint32_t*) makes it
even worse. IMHO this should just be written like this:
(*outptrp)[0] = state->__value.__wchb[0];
(*outptrp)[1] = state->__value.__wchb[1];
(*outptrp)[2] = state->__value.__wchb[2];
(*outptrp)[3] = state->__value.__wchb[3];
> @@ -558,7 +562,9 @@ internal_ucs4le_loop_single (struct __gc
> *outptrp += 4;
> #else
> /* XXX unaligned */
> - *(*((uint32_t **) outptrp)++) = state->__value.__wch;
> +
> + *(*((uint32_t **) outptrp)) = state->__value.__wch;
> + *outptrp += sizeof (uint32_t);
Same here.
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, MaxfeldstraÃe 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Get rid of lvalue casts etc.
2004-01-22 13:24 ` Andreas Schwab
@ 2004-02-07 15:58 ` Andreas Jaeger
2004-02-07 16:24 ` Andreas Schwab
0 siblings, 1 reply; 5+ messages in thread
From: Andreas Jaeger @ 2004-02-07 15:58 UTC (permalink / raw)
To: Andreas Schwab; +Cc: GNU libc hackers
[-- Attachment #1: Type: text/plain, Size: 13347 bytes --]
I've committed now the appended version of the patch,
Andreas
2004-02-07 Andreas Jaeger <aj@suse.de>
* iconv/gconv_simple.c (ucs4le_internal_loop): Remove cast used as
lvalue.
(internal_ucs4le_loop_single): Likewise.
(ucs4_internal_loop): Likewise.
(BODY): Likewise.
(internal_ucs4_loop_single): Likewise.
* iconvdata/iso8859-1.c (BODY): Likewise.
* iconvdata/cp1255.c (EMIT_SHIFT_TO_INIT): Likewise.
* iconvdata/cp1258.c (EMIT_SHIFT_TO_INIT): Likewise.
* iconvdata/gb18030.c (BODY): Likewise.
* iconvdata/armscii-8.c (BODY): Likewise.
* stdlib/msort.c (msort_with_tmp): Likewise.
* iconv/gconv_open.c (__gconv_open): Remove conditional expression
as lvalue.
============================================================
Index: iconv/gconv_open.c
--- iconv/gconv_open.c 29 Nov 2001 04:51:58 -0000 1.32
+++ iconv/gconv_open.c 7 Feb 2004 15:55:31 -0000
@@ -1,5 +1,5 @@
/* Find matching transformation algorithms and initialize steps.
- Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1998, 1999, 2000, 2001, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -182,8 +182,13 @@ __gconv_open (const char *toset, const c
|| __builtin_expect (__gconv_translit_find (runp), 0) == 0)
lastp = runp;
else
- /* This means we haven't found the module. Remove it. */
- (lastp == NULL ? trans : lastp->next) = runp->next;
+ {
+ /* This means we haven't found the module. Remove it. */
+ if (lastp == NULL)
+ trans = runp->next;
+ else
+ lastp->next = runp->next;
+ }
}
/* Allocate room for handle. */
============================================================
Index: iconv/gconv_simple.c
--- iconv/gconv_simple.c 11 Jun 2003 21:36:37 -0000 1.59
+++ iconv/gconv_simple.c 7 Feb 2004 15:55:31 -0000
@@ -1,5 +1,5 @@
/* Simple transformations functions.
- Copyright (C) 1997-2002, 2003 Free Software Foundation, Inc.
+ Copyright (C) 1997-2003, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -87,9 +87,11 @@ internal_ucs4_loop (struct __gconv_step
#if __BYTE_ORDER == __LITTLE_ENDIAN
/* Sigh, we have to do some real work. */
size_t cnt;
+ uint32_t *outptr32 = (uint32_t *) outptr;
for (cnt = 0; cnt < n_convert; ++cnt, inptr += 4)
- *((uint32_t *) outptr)++ = bswap_32 (*(const uint32_t *) inptr);
+ *outptr32++ = bswap_32 (*(const uint32_t *) inptr);
+ outptr = (unsigned char *) outptr32;
*inptrp = inptr;
*outptrp = outptr;
@@ -192,13 +194,16 @@ internal_ucs4_loop_single (struct __gcon
(*outptrp)[2] = state->__value.__wchb[1];
(*outptrp)[3] = state->__value.__wchb[0];
- *outptrp += 4;
#elif __BYTE_ORDER == __BIG_ENDIAN
/* XXX unaligned */
- *(*((uint32_t **) outptrp)++) = state->__value.__wch;
+ (*outptrp)[0] = state->__value.__wchb[0];
+ (*outptrp)[1] = state->__value.__wchb[1];
+ (*outptrp)[2] = state->__value.__wchb[2];
+ (*outptrp)[3] = state->__value.__wchb[3];
#else
# error "This endianess is not supported."
#endif
+ *outptrp += 4;
/* Clear the state buffer. */
state->__count &= ~7;
@@ -268,7 +273,8 @@ ucs4_internal_loop (struct __gconv_step
return __GCONV_ILLEGAL_INPUT;
}
- *((uint32_t *) outptr)++ = inval;
+ *((uint32_t *) outptr) = inval;
+ outptr += sizeof (uint32_t);
}
*inptrp = inptr;
@@ -558,8 +564,13 @@ internal_ucs4le_loop_single (struct __gc
*outptrp += 4;
#else
/* XXX unaligned */
- *(*((uint32_t **) outptrp)++) = state->__value.__wch;
+ (*outptrp)[0] = state->__value.__wchb[0];
+ (*outptrp)[1] = state->__value.__wchb[1];
+ (*outptrp)[2] = state->__value.__wchb[2];
+ (*outptrp)[3] = state->__value.__wchb[3];
+
#endif
+ *outptrp += 4;
/* Clear the state buffer. */
state->__count &= ~7;
@@ -626,7 +637,8 @@ ucs4le_internal_loop (struct __gconv_ste
return __GCONV_ILLEGAL_INPUT;
}
- *((uint32_t *) outptr)++ = inval;
+ *((uint32_t *) outptr) = inval;
+ outptr += sizeof (uint32_t);
}
*inptrp = inptr;
@@ -808,7 +820,8 @@ ucs4le_internal_loop_single (struct __gc
} \
else \
/* It's an one byte sequence. */ \
- *((uint32_t *) outptr)++ = *inptr++; \
+ *((uint32_t *) outptr) = *inptr++; \
+ outptr += sizeof (uint32_t); \
}
#define LOOP_NEED_FLAGS
#include <iconv/loop.c>
@@ -838,7 +851,8 @@ ucs4le_internal_loop_single (struct __gc
} \
else \
/* It's an one byte sequence. */ \
- *outptr++ = *((const uint32_t *) inptr)++; \
+ *outptr++ = *((const uint32_t *) inptr); \
+ inptr += sizeof (uint32_t); \
}
#define LOOP_NEED_FLAGS
#include <iconv/loop.c>
@@ -1032,7 +1046,8 @@ ucs4le_internal_loop_single (struct __gc
} \
\
/* Now adjust the pointers and store the result. */ \
- *((uint32_t *) outptr)++ = ch; \
+ *((uint32_t *) outptr) = ch; \
+ outptr += sizeof (uint32_t); \
}
#define LOOP_NEED_FLAGS
@@ -1153,7 +1168,8 @@ ucs4le_internal_loop_single (struct __gc
STANDARD_FROM_LOOP_ERR_HANDLER (2); \
} \
\
- *((uint32_t *) outptr)++ = u1; \
+ *((uint32_t *) outptr) = u1; \
+ outptr += sizeof (uint32_t); \
inptr += 2; \
}
#define LOOP_NEED_FLAGS
@@ -1201,7 +1217,8 @@ ucs4le_internal_loop_single (struct __gc
} \
else \
{ \
- *((uint16_t *) outptr)++ = val; \
+ *((uint16_t *) outptr) = val; \
+ outptr += sizeof (uint16_t); \
inptr += 4; \
} \
}
@@ -1242,7 +1259,8 @@ ucs4le_internal_loop_single (struct __gc
continue; \
} \
\
- *((uint32_t *) outptr)++ = u1; \
+ *((uint32_t *) outptr) = u1; \
+ outptr += sizeof (uint32_t); \
inptr += 2; \
}
#define LOOP_NEED_FLAGS
@@ -1291,7 +1309,8 @@ ucs4le_internal_loop_single (struct __gc
} \
else \
{ \
- *((uint16_t *) outptr)++ = bswap_16 (val); \
+ *((uint16_t *) outptr) = bswap_16 (val); \
+ outptr += sizeof (uint16_t); \
inptr += 4; \
} \
}
============================================================
Index: iconvdata/cp1255.c
--- iconvdata/cp1255.c 2 Dec 2002 22:07:52 -0000 1.7
+++ iconvdata/cp1255.c 7 Feb 2004 15:55:31 -0000
@@ -1,5 +1,5 @@
/* Conversion from and to CP1255.
- Copyright (C) 1998, 2001, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1998, 2001, 2002, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998,
and Bruno Haible <haible@clisp.cons.org>, 2001.
@@ -69,7 +69,8 @@
if (__builtin_expect (outbuf + 4 <= outend, 1)) \
{ \
/* Write out the last character. */ \
- *((uint32_t *) outbuf)++ = data->__statep->__count >> 3; \
+ *((uint32_t *) outbuf) = data->__statep->__count >> 3; \
+ outbuf += sizeof (uint32_t); \
data->__statep->__count = 0; \
} \
else \
============================================================
Index: iconvdata/armscii-8.c
--- iconvdata/armscii-8.c 2 Dec 2002 22:07:52 -0000 1.4
+++ iconvdata/armscii-8.c 7 Feb 2004 15:55:31 -0000
@@ -1,5 +1,5 @@
/* Conversion to and from ARMSCII-8
- Copyright (C) 1997-1999, 2000-2002 Free Software Foundation, Inc.
+ Copyright (C) 1997-1999, 2000-2002, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -57,11 +57,17 @@ static const uint16_t map_from_armscii_8
uint_fast8_t ch = *inptr; \
\
if (ch <= 0xa0) \
- /* Upto and including 0xa0 the ARMSCII-8 corresponds to Unicode. */ \
- *((uint32_t *) outptr)++ = ch; \
+ { \
+ /* Upto and including 0xa0 the ARMSCII-8 corresponds to Unicode. */ \
+ *((uint32_t *) outptr) = ch; \
+ outptr += sizeof (uint32_t); \
+ } \
else if (ch >= 0xa2 && ch <= 0xfe) \
- /* Use the table. */ \
- *((uint32_t *) outptr)++ = map_from_armscii_8[ch - 0xa2]; \
+ { \
+ /* Use the table. */ \
+ *((uint32_t *) outptr) = map_from_armscii_8[ch - 0xa2]; \
+ outptr += sizeof (uint32_t); \
+ } \
else \
{ \
/* This is an illegal character. */ \
============================================================
Index: iconvdata/cp1258.c
--- iconvdata/cp1258.c 2 Dec 2002 22:07:52 -0000 1.11
+++ iconvdata/cp1258.c 7 Feb 2004 15:55:32 -0000
@@ -1,5 +1,5 @@
/* Conversion from and to CP1258.
- Copyright (C) 1998, 2001, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1998, 2001, 2002, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998,
and Bruno Haible <haible@clisp.cons.org>, 2001.
@@ -70,7 +70,8 @@
if (__builtin_expect (outbuf + 4 <= outend, 1)) \
{ \
/* Write out the last character. */ \
- *((uint32_t *) outbuf)++ = data->__statep->__count >> 3; \
+ *((uint32_t *) outbuf) = data->__statep->__count >> 3; \
+ outbuf += sizeof (uint32_t); \
data->__statep->__count = 0; \
} \
else \
============================================================
Index: iconvdata/gb18030.c
--- iconvdata/gb18030.c 2 Dec 2002 22:07:54 -0000 1.12
+++ iconvdata/gb18030.c 7 Feb 2004 15:55:54 -0000
@@ -1,5 +1,5 @@
/* Mapping tables for GBK handling.
- Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2000, 2001, 2002, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Sean Chen <seanc@turbolinux.com.cn>, 1999.
@@ -25769,7 +25769,8 @@ static const unsigned char __ucs_to_gb18
} \
} \
\
- *((uint32_t *) outptr)++ = ch; \
+ *((uint32_t *) outptr) = ch; \
+ outptr += sizeof (uint32_t); \
}
#define LOOP_NEED_FLAGS
#define ONEBYTE_BODY \
============================================================
Index: iconvdata/iso8859-1.c
--- iconvdata/iso8859-1.c 2 Dec 2002 22:07:56 -0000 1.24
+++ iconvdata/iso8859-1.c 7 Feb 2004 15:55:54 -0000
@@ -1,5 +1,5 @@
/* Conversion to and from ISO 8859-1.
- Copyright (C) 1997-1999, 2000-2002 Free Software Foundation, Inc.
+ Copyright (C) 1997-1999, 2000-2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -35,7 +35,8 @@
#define MIN_NEEDED_OUTPUT MIN_NEEDED_TO
#define LOOPFCT FROM_LOOP
#define BODY \
- *((uint32_t *) outptr)++ = *inptr++;
+ *((uint32_t *) outptr) = *inptr++; \
+ outptr += sizeof (uint32_t);
#define ONEBYTE_BODY \
{ \
return c; \
============================================================
Index: stdlib/msort.c
--- stdlib/msort.c 24 Sep 2002 04:20:57 -0000 1.20
+++ stdlib/msort.c 7 Feb 2004 15:55:54 -0000
@@ -1,6 +1,6 @@
/* An alternative to qsort, with an identical interface.
This file is part of the GNU C Library.
- Copyright (C) 1992,95-97,99,2000,01,02 Free Software Foundation, Inc.
+ Copyright (C) 1992,95-97,99,2000,01,02,04 Free Software Foundation, Inc.
Written by Mike Haertel, September 1988.
The GNU C Library is free software; you can redistribute it and/or
@@ -56,12 +56,16 @@ msort_with_tmp (void *b, size_t n, size_
if ((*cmp) (b1, b2) <= 0)
{
--n1;
- *((op_t *) tmp)++ = *((op_t *) b1)++;
+ *((op_t *) tmp) = *((op_t *) b1);
+ tmp += sizeof (op_t);
+ b1 += sizeof (op_t);
}
else
{
--n2;
- *((op_t *) tmp)++ = *((op_t *) b2)++;
+ *((op_t *) tmp) = *((op_t *) b2);
+ tmp += sizeof (op_t);
+ b2 += sizeof (op_t);
}
}
else
--
Andreas Jaeger, aj@suse.de, http://www.suse.de/~aj
SuSE Linux AG, Maxfeldstr. 5, 90409 Nürnberg, Germany
GPG fingerprint = 93A3 365E CE47 B889 DF7F FED1 389A 563C C272 A126
[-- Attachment #2: Type: application/pgp-signature, Size: 188 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Get rid of lvalue casts etc.
2004-02-07 15:58 ` Andreas Jaeger
@ 2004-02-07 16:24 ` Andreas Schwab
2004-02-07 16:32 ` Andreas Jaeger
0 siblings, 1 reply; 5+ messages in thread
From: Andreas Schwab @ 2004-02-07 16:24 UTC (permalink / raw)
To: Andreas Jaeger; +Cc: GNU libc hackers
Andreas Jaeger <aj@suse.de> writes:
> @@ -558,8 +564,13 @@ internal_ucs4le_loop_single (struct __gc
> *outptrp += 4;
^^^^^^^^^^^^^^
> #else
> /* XXX unaligned */
> - *(*((uint32_t **) outptrp)++) = state->__value.__wch;
> + (*outptrp)[0] = state->__value.__wchb[0];
> + (*outptrp)[1] = state->__value.__wchb[1];
> + (*outptrp)[2] = state->__value.__wchb[2];
> + (*outptrp)[3] = state->__value.__wchb[3];
> +
> #endif
> + *outptrp += 4;
You forgot to delete the line above.
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, MaxfeldstraÃe 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Get rid of lvalue casts etc.
2004-02-07 16:24 ` Andreas Schwab
@ 2004-02-07 16:32 ` Andreas Jaeger
0 siblings, 0 replies; 5+ messages in thread
From: Andreas Jaeger @ 2004-02-07 16:32 UTC (permalink / raw)
To: Andreas Schwab; +Cc: GNU libc hackers
[-- Attachment #1: Type: text/plain, Size: 808 bytes --]
Andreas Schwab <schwab@suse.de> writes:
> Andreas Jaeger <aj@suse.de> writes:
>
>> @@ -558,8 +564,13 @@ internal_ucs4le_loop_single (struct __gc
>> *outptrp += 4;
> ^^^^^^^^^^^^^^
>> #else
>> /* XXX unaligned */
>> - *(*((uint32_t **) outptrp)++) = state->__value.__wch;
>> + (*outptrp)[0] = state->__value.__wchb[0];
>> + (*outptrp)[1] = state->__value.__wchb[1];
>> + (*outptrp)[2] = state->__value.__wchb[2];
>> + (*outptrp)[3] = state->__value.__wchb[3];
>> +
>> #endif
>> + *outptrp += 4;
>
> You forgot to delete the line above.
Thanks for the double-checking,
Andreas
--
Andreas Jaeger, aj@suse.de, http://www.suse.de/~aj
SuSE Linux AG, Maxfeldstr. 5, 90409 Nürnberg, Germany
GPG fingerprint = 93A3 365E CE47 B889 DF7F FED1 389A 563C C272 A126
[-- Attachment #2: Type: application/pgp-signature, Size: 188 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2004-02-07 16:32 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-01-22 11:13 Get rid of lvalue casts etc Andreas Jaeger
2004-01-22 13:24 ` Andreas Schwab
2004-02-07 15:58 ` Andreas Jaeger
2004-02-07 16:24 ` Andreas Schwab
2004-02-07 16:32 ` Andreas Jaeger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).