gcc/libcpp
Nathan Sidwell 1f9db6929d c++: header-unit build capability [PR 99023]
This defect really required building header-units and include translation
of pieces of the standard library.  This adds smarts to the modules
test harness to do that -- accept .X files as the source file, but
provide '-x c++-system-header $HDR' in the options.  The .X file will
be considered by the driver to be a linker script and ignored (with a
warning).

Using this we can add 2 tests that end up building list_initializer
and iostream, along with a test that iostream's build
include-translates list_initializer's #include.  That discovered a set
of issues with the -flang-info-include-translate=HDR handling, also
fixed and documented here.

	PR c++/99023
	gcc/cp/
	* module.cc (canonicalize_header_name): Use
	cpp_probe_header_unit.
	(maybe_translate_include): Fix note_includes comparison.
	(init_modules): Fix note_includes string termination.
	libcpp/
	* include/cpplib.h (cpp_find_header_unit): Rename to ...
	(cpp_probe_header_unit): ... this.
	* internal.h (_cp_find_header_unit): Declare.
	* files.c (cpp_find_header_unit): Break apart to ..
	(test_header_unit): ... this, and ...
	(_cpp_find_header_unit): ... and, or and ...
	(cpp_probe_header_unit): ... this.
	* macro.c (cpp_get_token_1): Call _cpp_find_header_unit.
	gcc/
	* doc/invoke.texi (flang-info-include-translate): Document header
	lookup behaviour.
	gcc/testsuite/
	* g++.dg/modules/modules.exp: Bail on cross-testing.  Add support
	for .X files.
	* g++.dg/modules/pr99023_a.X: New.
	* g++.dg/modules/pr99023_b.X: New.
2021-02-18 13:22:48 -08:00
..
include c++: header-unit build capability [PR 99023] 2021-02-18 13:22:48 -08:00
po Daily bump. 2021-02-06 00:16:39 +00:00
aclocal.m4 libcpp: Enable Intel CET on Intel CET enabled host for jit 2020-05-12 09:17:45 -07:00
ChangeLog Daily bump. 2021-02-17 00:16:20 +00:00
ChangeLog.jit
charset.c Update copyright years. 2021-01-04 10:26:59 +01:00
config.in
configure Require CET support only for the final GCC build 2020-07-30 05:36:24 -07:00
configure.ac libcpp, libdecnumber: configure and substitute AR 2020-05-23 21:59:02 +00:00
directives.c Update copyright years. 2021-01-04 10:26:59 +01:00
errors.c Update copyright years. 2021-01-04 10:26:59 +01:00
expr.c c++, libcpp: Use make_signed_t<size_t> in the 1z diagnostics 2021-02-04 18:30:45 +01:00
files.c c++: header-unit build capability [PR 99023] 2021-02-18 13:22:48 -08:00
generated_cpp_wcwidth.h libcpp: Update cpp_wcwidth() to Unicode 13.0.0 2020-11-07 09:36:43 -05:00
identifiers.c Update copyright years. 2021-01-04 10:26:59 +01:00
init.c c++: Implement C++23 P0330 - Literal Suffixes for ptrdiff_t and size_t. 2021-02-03 12:12:31 -05:00
internal.h c++: header-unit build capability [PR 99023] 2021-02-18 13:22:48 -08:00
lex.c libcpp: Fix up -fdirectives-only preprocessing [PR98882] 2021-02-03 23:18:05 +01:00
line-map.c libcpp: fix ICE comparing macro locations without column info [PR96391] 2021-02-10 14:33:10 -05:00
location-example.txt
macro.c c++: header-unit build capability [PR 99023] 2021-02-18 13:22:48 -08:00
Makefile.in Update copyright years. 2021-01-04 10:26:59 +01:00
makeucnid.c Update copyright years. 2021-01-04 10:26:59 +01:00
mkdeps.c preprocessor: Make quoting : [PR 95253] 2021-01-15 08:56:20 -08:00
pch.c Update copyright years. 2021-01-04 10:26:59 +01:00
symtab.c Update copyright years. 2021-01-04 10:26:59 +01:00
system.h Update copyright years. 2021-01-04 10:26:59 +01:00
traditional.c Update copyright years. 2021-01-04 10:26:59 +01:00
ucnid.h Update copyright years. 2021-01-04 10:26:59 +01:00
ucnid.tab Update copyright years. 2021-01-04 10:26:59 +01:00