aboutsummaryrefslogtreecommitdiff
path: root/gcc/builtins.c
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@acm.org>2020-07-14 10:49:03 -0700
committerNathan Sidwell <nathan@acm.org>2020-07-14 10:58:36 -0700
commit0257997968fc4b62547cdc2a5cf5e01777bd7ed7 (patch)
tree5ff55f5854295e25b213772207d774d23db2e3d9 /gcc/builtins.c
parentb52643ab9004ba8ecea06a399885fe1e04183eda (diff)
downloadgcc-0257997968fc4b62547cdc2a5cf5e01777bd7ed7.zip
gcc-0257997968fc4b62547cdc2a5cf5e01777bd7ed7.tar.gz
gcc-0257997968fc4b62547cdc2a5cf5e01777bd7ed7.tar.bz2
c++: Parser entry cleanup
The handling of PCH is a little trick, because we have to deal with it before allocating memory. I found the layering somewhat confusing. This patch reorganizes that, so that the stopping of PCH is done in exactly one place, and the ordering of lexer creation relative to that is much clearer. I also changed the error message about multiple source files as with C++20, 'modules' means something rather specific. Other than the error message changes, no functional changes. gcc/cp/ * parser.c (cp_lexer_alloc): Do not deal with PCH here. (cp_lexer_new_main): Deal with PCH here. Store the tokens directly into the buffer. (cp_lexer_new_from_tokens): Assert last token isn't purged either. (cp_lexer_get_preprocessor_token): Change first arg to flags, adjust. (cp_parser_new): Pass the lexer in, don't create it here. (cp_parser_translation_unit): Initialize access checks here. (cp_parser_initial_pragma): First token is provided by caller, don't deal with PCH stopping here. Adjust error message. (c_parse_file): Adjust, change error message to avoid C++20 module confusion.
Diffstat (limited to 'gcc/builtins.c')
0 files changed, 0 insertions, 0 deletions