mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-19 15:11:08 +08:00
compiler: Ignore byte-order-mark at start of file.
From-SVN: r191485
This commit is contained in:
parent
17fff17b06
commit
69d4d74dff
@ -722,7 +722,16 @@ Lex::next_token()
|
||||
unsigned int ci;
|
||||
bool issued_error;
|
||||
this->lineoff_ = p - this->linebuf_;
|
||||
this->advance_one_utf8_char(p, &ci, &issued_error);
|
||||
const char *pnext = this->advance_one_utf8_char(p, &ci,
|
||||
&issued_error);
|
||||
|
||||
// Ignore byte order mark at start of file.
|
||||
if (ci == 0xfeff && this->lineno_ == 1 && this->lineoff_ == 0)
|
||||
{
|
||||
p = pnext;
|
||||
break;
|
||||
}
|
||||
|
||||
if (Lex::is_unicode_letter(ci))
|
||||
return this->gather_identifier();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user