Hi, this is the 2nd version of the patch. the main changes are:
1. some typo.
2. enhance the error message to provide user idea on how to increase the
limit.
bootstrap and regression tested on X86, no issue.
Okay for trunk?
thanks.
Qing
gcc/ChangeLog:
2019-06-03 qing zhao <[email protected]>
* doc/cppopts.texi: Add document for -fmax-include-depth.
* doc/invoke.texi (Preprocessor Options): List -fmax-include-depth.
libcpp/ChangeLog:
2019-06-03 qing zhao <[email protected]>
* directives.c (do_include_common): Replace CPP_STACK_MAX with
CPP_OPTION (pfile, max_include_depth).
* include/cpplib.h (struct cpp_options): Add new field
max_include_depth.
* init.c (cpp_create_reader): Initiate new field max_include_depth.
* internal.h: Delete CPP_STACK_MAX.
gcc/c-family/ChangeLog:
2019-06-03 qing zhao <[email protected]>
* c-opts.c (c_common_handle_option): Handle -fmax-include-depth.
* c.opt: Add new option -fmax-include-depth.
gcc/testsuite/ChangeLog:
2019-06-03 qing zhao <[email protected]>
* c-c++-common/cpp/fmax-include-depth-1a.h: New test.
* c-c++-common/cpp/fmax-include-depth-1b.h: New test.
* c-c++-common/cpp/fmax-include-depth.c: New test.
0001-PR-preprocessor-90581.patch
Description: Binary data
