* c-lex.c [! NO_IMPLICIT_EXTERN_C] (cb_enter_file): Check

in_system_header and flags[1] before dereferencing flags[2].

From-SVN: r37361
This commit is contained in:
Hans-Peter Nilsson 2000-11-10 05:26:10 +00:00 committed by Jeff Law
parent 881a89697e
commit 5925798060
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2000-11-09 Hans-Peter Nilsson <hp@axis.com>
* c-lex.c [! NO_IMPLICIT_EXTERN_C] (cb_enter_file): Check
in_system_header and flags[1] before dereferencing flags[2].
2000-11-09 Matthew Hiller <hiller@redhat.com>
* reload1.c (reload_combine): Fixed calculation of

View File

@ -714,7 +714,7 @@ cb_enter_file (pfile)
#ifndef NO_IMPLICIT_EXTERN_C
if (c_header_level)
++c_header_level;
else if (flags[2] != 0)
else if (in_system_header && flags[1] != 0 && flags[2] != 0)
{
c_header_level = 1;
++pending_lang_change;