Specify reason of -Winvalid-pch warning

gcc/c-family
	PR pch/86674
	* c-pch.c (c_common_valid_pch): Use cpp_warning with CPP_W_INVALID_PCH
	reason to fix -Werror=invalid-pch and -Wno-error=invalid-pch switches.

libcpp
	PR pch/86674
	* files.c (_cpp_find_file): Use CPP_DL_NOTE not CPP_DL_ERROR in call to
	cpp_error.
This commit is contained in:
Nicholas Guriev 2020-11-12 08:59:35 -05:00 committed by Jeff Law
parent 071a31a533
commit cb808c583d
2 changed files with 16 additions and 26 deletions

View file

@ -571,7 +571,7 @@ _cpp_find_file (cpp_reader *pfile, const char *fname, cpp_dir *start_dir,
"one or more PCH files were found,"
" but they were invalid");
if (!cpp_get_options (pfile)->warn_invalid_pch)
cpp_error (pfile, CPP_DL_ERROR,
cpp_error (pfile, CPP_DL_NOTE,
"use -Winvalid-pch for more information");
}