1 To: Glibc hackers <libc-hacker at sources dot redhat dot com>
2 Subject: iconvdata: Get rid of lvalue casts
3 From: Andreas Jaeger <aj at suse dot de>
4 Date: Sun, 07 Mar 2004 08:29:47 +0100
5 Message-ID: <m3fzclt8r8.fsf@gromit.moeb>
7 Here's one more patch to get rid of lvalues to make GCC 3.5 happy. It
8 generates the same code as before on my machine and passes the
15 2004-03-07 Andreas Jaeger <aj@suse.de>
17 * iconvdata/iso-2022-cn-ext.c (BODY): Remove cast used as lvalue.
18 * iconvdata/tcvn5712-1.c (EMIT_SHIFT_TO_INIT): Likewise.
19 * iconvdata/euc-jisx0213.c (EMIT_SHIFT_TO_INIT): Likewise.
20 * iconvdata/shift_jisx0213.c (EMIT_SHIFT_TO_INIT): Likewise.
21 * iconvdata/tscii.c (EMIT_SHIFT_TO_INIT): Likewise.
23 [rediffed to make crosstool happy]
25 diff -ur glibc-2.3.3.orig/iconvdata/euc-jisx0213.c glibc-2.3.3.new/iconvdata/euc-jisx0213.c
26 --- glibc-2.3.3.orig/iconvdata/euc-jisx0213.c Mon Dec 2 14:07:54 2002
27 +++ glibc-2.3.3.new/iconvdata/euc-jisx0213.c Fri Mar 18 09:29:22 2005
29 /* Conversion from and to EUC-JISX0213.
30 - Copyright (C) 2002 Free Software Foundation, Inc.
31 + Copyright (C) 2002, 2004 Free Software Foundation, Inc.
32 This file is part of the GNU C Library.
33 Contributed by Bruno Haible <bruno@clisp.org>, 2002.
36 if (__builtin_expect (outbuf + 4 <= outend, 1)) \
38 /* Write out the last character. */ \
39 - *((uint32_t *) outbuf)++ = data->__statep->__count >> 3; \
40 + *((uint32_t *) outbuf) = data->__statep->__count >> 3; \
41 + outbuf += sizeof (uint32_t); \
42 data->__statep->__count = 0; \
45 diff -ur glibc-2.3.3.orig/iconvdata/iso-2022-cn-ext.c glibc-2.3.3.new/iconvdata/iso-2022-cn-ext.c
46 --- glibc-2.3.3.orig/iconvdata/iso-2022-cn-ext.c Fri Jun 28 14:13:14 2002
47 +++ glibc-2.3.3.new/iconvdata/iso-2022-cn-ext.c Fri Mar 18 09:29:22 2005
49 /* Conversion module for ISO-2022-CN-EXT.
50 - Copyright (C) 2000-2002 Free Software Foundation, Inc.
51 + Copyright (C) 2000-2002, 2004 Free Software Foundation, Inc.
52 This file is part of the GNU C Library.
53 Contributed by Ulrich Drepper <drepper@cygnus.com>, 2000.
59 - *((uint32_t *) outptr)++ = ch; \
60 + *((uint32_t *) outptr) = ch; \
61 + outptr += sizeof (uint32_t); \
63 #define EXTRA_LOOP_DECLS , int *setp
64 #define INIT_PARAMS int set = (*setp >> 3) & CURRENT_MASK; \
65 diff -ur glibc-2.3.3.orig/iconvdata/shift_jisx0213.c glibc-2.3.3.new/iconvdata/shift_jisx0213.c
66 --- glibc-2.3.3.orig/iconvdata/shift_jisx0213.c Mon Dec 2 14:07:56 2002
67 +++ glibc-2.3.3.new/iconvdata/shift_jisx0213.c Fri Mar 18 09:29:22 2005
69 /* Conversion from and to Shift_JISX0213.
70 - Copyright (C) 2002 Free Software Foundation, Inc.
71 + Copyright (C) 2002, 2004 Free Software Foundation, Inc.
72 This file is part of the GNU C Library.
73 Contributed by Bruno Haible <bruno@clisp.org>, 2002.
76 if (__builtin_expect (outbuf + 4 <= outend, 1)) \
78 /* Write out the last character. */ \
79 - *((uint32_t *) outbuf)++ = data->__statep->__count >> 3; \
80 + *((uint32_t *) outbuf) = data->__statep->__count >> 3; \
81 + outbuf += sizeof (uint32_t); \
82 data->__statep->__count = 0; \
85 diff -ur glibc-2.3.3.orig/iconvdata/tcvn5712-1.c glibc-2.3.3.new/iconvdata/tcvn5712-1.c
86 --- glibc-2.3.3.orig/iconvdata/tcvn5712-1.c Mon Dec 2 14:07:52 2002
87 +++ glibc-2.3.3.new/iconvdata/tcvn5712-1.c Fri Mar 18 09:29:22 2005
89 /* Conversion to and from TCVN5712-1.
90 - Copyright (C) 2001, 2002 Free Software Foundation, Inc.
91 + Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc.
92 This file is part of the GNU C Library.
93 Contributed by Ulrich Drepper <drepper@redhat.com>, 2001.
96 if (__builtin_expect (outbuf + 4 <= outend, 1)) \
98 /* Write out the last character. */ \
99 - *((uint32_t *) outbuf)++ = data->__statep->__count >> 3; \
100 + *((uint32_t *) outbuf) = data->__statep->__count >> 3; \
101 + outbuf += sizeof (uint32_t); \
102 data->__statep->__count = 0; \
105 diff -ur glibc-2.3.3.orig/iconvdata/tscii.c glibc-2.3.3.new/iconvdata/tscii.c
106 --- glibc-2.3.3.orig/iconvdata/tscii.c Mon Sep 23 20:39:45 2002
107 +++ glibc-2.3.3.new/iconvdata/tscii.c Fri Mar 18 09:29:22 2005
109 /* Conversion from and to TSCII.
110 - Copyright (C) 2002 Free Software Foundation, Inc.
111 + Copyright (C) 2002, 2004 Free Software Foundation, Inc.
112 This file is part of the GNU C Library.
113 Contributed by Bruno Haible <bruno@clisp.org>, 2002.
118 /* Write out the pending character. */ \
119 - *((uint32_t *) outbuf)++ = data->__statep->__count >> 8; \
120 + *((uint32_t *) outbuf) = data->__statep->__count >> 8; \
121 + outbuf += sizeof (uint32_t); \
122 /* Retrieve the successor state. */ \
123 data->__statep->__count = \
124 tscii_next_state[(data->__statep->__count >> 4) & 0x0f]; \