c-lex.c (yylex): Fix unaligned access of wchar_t.

Fri Oct 16 15:26:24 1998  Dave Brolley  <brolley@cygnus.com>
        * c-lex.c (yylex): Fix unaligned access of wchar_t.

From-SVN: r23133
This commit is contained in:
Dave Brolley 1998-10-16 12:40:02 +00:00 committed by Dave Brolley
parent 6b4b3deb4e
commit 1f3d9c636b
2 changed files with 9 additions and 7 deletions

View File

@ -1,3 +1,7 @@
Fri Oct 16 15:26:24 1998 Dave Brolley <brolley@cygnus.com>
* c-lex.c (yylex): Fix unaligned access of wchar_t.
Fri Oct 16 10:47:53 1998 Nick Clifton <nickc@cygnus.com>
* config/arm/arm.h (TARGET_SWITCHES): Add --help documentation.

View File

@ -2036,15 +2036,13 @@ yylex ()
/* mbtowc sometimes needs an extra char before accepting */
if (char_len <= i)
UNGETC (c);
if (wide_flag)
if (! wide_flag)
{
*(wchar_t *)p = wc;
p += sizeof (wc);
p += (i + 1);
c = GETC ();
continue;
}
else
p += (i + 1);
c = GETC ();
continue;
c = wc;
}
#endif /* MULTIBYTE_CHARS */
}