aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-common.c
diff options
context:
space:
mode:
authorJim Wilson <wilson@gcc.gnu.org>1995-11-29 11:05:42 -0800
committerJim Wilson <wilson@gcc.gnu.org>1995-11-29 11:05:42 -0800
commit41bbd14edcb178887d56cac714ad3258f16f391a (patch)
tree62b21ce01eeabbc279ae3a52966fdd64f043ca55 /gcc/c-common.c
parentbd95070abd119ff7e7bba478e370205a31a11a34 (diff)
downloadgcc-41bbd14edcb178887d56cac714ad3258f16f391a.zip
gcc-41bbd14edcb178887d56cac714ad3258f16f391a.tar.gz
gcc-41bbd14edcb178887d56cac714ad3258f16f391a.tar.bz2
(combine_strings): Add support for WCHAR_TYPE as short.
From-SVN: r10622
Diffstat (limited to 'gcc/c-common.c')
-rw-r--r--gcc/c-common.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/c-common.c b/gcc/c-common.c
index 78b4d85..99b84b2 100644
--- a/gcc/c-common.c
+++ b/gcc/c-common.c
@@ -157,7 +157,12 @@ combine_strings (strings)
{
int i;
for (i = 0; i < len; i++)
- ((int *) q)[i] = TREE_STRING_POINTER (t)[i];
+ {
+ if (WCHAR_TYPE_SIZE == HOST_BITS_PER_SHORT)
+ ((short *) q)[i] = TREE_STRING_POINTER (t)[i];
+ else
+ ((int *) q)[i] = TREE_STRING_POINTER (t)[i];
+ }
q += len * wchar_bytes;
}
}