From d62a94fe32b2d7b1a1aad2c85e2dea9b417bf5b9 Mon Sep 17 00:00:00 2001 From: pfg Date: Wed, 25 Dec 2013 21:59:56 +0000 Subject: [PATCH] MFC r258826, r259555, r 259558: libcpp: Merge fixes from upstream Fixes: GCC preprocessor/29966: GCC preprocessor/28709: GCC c/31924 GCC preprocessor/14331 gcc: add Apple-compatible -Wnewline-eof Obtained from: gcc per-4.3 (rev. 121340, 124356, 124358, 124730, 125212, 125255 ; GPLv2) Apple Inc. (Apple GCC 4.2 - 5531) git-svn-id: svn://svn.freebsd.org/base/stable/10@259890 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f --- contrib/gcc/c-opts.c | 6 ++ contrib/gcc/c.opt | 6 ++ contrib/gcc/doc/invoke.texi | 8 +++ contrib/gcclibs/libcpp/ChangeLog.apple | 9 +++ contrib/gcclibs/libcpp/ChangeLog.gcc43 | 28 ++++++++++ contrib/gcclibs/libcpp/charset.c | 1 + contrib/gcclibs/libcpp/expr.c | 24 ++++---- contrib/gcclibs/libcpp/include/cpplib.h | 5 ++ contrib/gcclibs/libcpp/init.c | 4 ++ contrib/gcclibs/libcpp/lex.c | 18 ++++-- contrib/gcclibs/libcpp/macro.c | 36 +++++++----- contrib/gcclibs/libcpp/pch.c | 74 ++++++++++++------------- 12 files changed, 153 insertions(+), 66 deletions(-) create mode 100644 contrib/gcclibs/libcpp/ChangeLog.apple diff --git a/contrib/gcc/c-opts.c b/contrib/gcc/c-opts.c index 0c584eb8c..a1ec3e302 100644 --- a/contrib/gcc/c-opts.c +++ b/contrib/gcc/c-opts.c @@ -487,6 +487,12 @@ c_common_handle_option (size_t scode, const char *arg, int value) cpp_opts->warn_multichar = value; break; + /* APPLE LOCAL begin -Wnewline-eof */ + case OPT_Wnewline_eof: + cpp_opts->warn_newline_at_eof = value; + break; + /* APPLE LOCAL end -Wnewline-eof */ + case OPT_Wnormalized_: if (!value || (arg && strcasecmp (arg, "none") == 0)) cpp_opts->warn_normalize = normalized_none; diff --git a/contrib/gcc/c.opt b/contrib/gcc/c.opt index 80b5312df..be3a80fca 100644 --- a/contrib/gcc/c.opt +++ b/contrib/gcc/c.opt @@ -292,6 +292,12 @@ Wnested-externs C ObjC Var(warn_nested_externs) Warn about \"extern\" declarations not at file scope +; APPLE LOCAL begin -Wnewline-eof +Wnewline-eof +C ObjC C++ ObjC++ +Warn about files missing a newline at the end of the file +; APPLE LOCAL end -Wnewline-eof + Wnon-template-friend C++ ObjC++ Var(warn_nontemplate_friend) Init(1) Warn when non-templatized friend functions are declared within a template diff --git a/contrib/gcc/doc/invoke.texi b/contrib/gcc/doc/invoke.texi index 51ac30f0d..37a668a27 100644 --- a/contrib/gcc/doc/invoke.texi +++ b/contrib/gcc/doc/invoke.texi @@ -169,6 +169,8 @@ in the following sections. -trigraphs -no-integrated-cpp -traditional -traditional-cpp @gol -fallow-single-precision -fcond-mismatch @gol -fsigned-bitfields -fsigned-char @gol +@c APPLE LOCAL -Wnewline-eof 2001-08-23 --sts ** +-Wnewline-eof (Apple compatible) @gol -funsigned-bitfields -funsigned-char} @item C++ Language Options @@ -2041,6 +2043,12 @@ Inhibit all warning messages. @opindex Wno-import Inhibit warning messages about the use of @samp{#import}. +@c APPLE LOCAL begin -Wnewline-eof 2001-08-23 --sts ** +@item -Wnewline-eof +@opindex Wnewline-eof +Warn about files missing a newline at the end of the file. (Apple compatible) +@c APPLE LOCAL end -Wnewline-eof 2001-08-23 --sts ** + @item -Wchar-subscripts @opindex Wchar-subscripts Warn if an array subscript has type @code{char}. This is a common cause diff --git a/contrib/gcclibs/libcpp/ChangeLog.apple b/contrib/gcclibs/libcpp/ChangeLog.apple new file mode 100644 index 000000000..c38bfe233 --- /dev/null +++ b/contrib/gcclibs/libcpp/ChangeLog.apple @@ -0,0 +1,9 @@ +2008-08-04 Bill Wendling + + Radar 6121572 + * charset.c (_cpp_convert_input): Don't read to.text[-1]. + +2005-02-17 Devang Patel + + Radar 3958387 + * libcpp/lex.c (_cpp_get_fresh_line): Check warn_newline_at_eof. diff --git a/contrib/gcclibs/libcpp/ChangeLog.gcc43 b/contrib/gcclibs/libcpp/ChangeLog.gcc43 index 6957bce0d..da70d1c30 100644 --- a/contrib/gcclibs/libcpp/ChangeLog.gcc43 +++ b/contrib/gcclibs/libcpp/ChangeLog.gcc43 @@ -7,6 +7,11 @@ * include/cpplib.h: Add CPP_N_BINARY, to be used for 0b-prefixed binary integer constants. +2007-05-31 Dave Korn (r125212) + + PR preprocessor/14331 + * lex.c (_cpp_get_fresh_line): Don't warn if no newline at EOF. + 2007-05-21 Ian Lance Taylor (r124929) * internal.h (struct cpp_reader): Add new fields: @@ -23,6 +28,29 @@ (_cpp_cleanup_files): Free pfile->nonexistent_file_hash and pfile->nonexistent_file_ob. +2007-05-14 Janis Johnson (r124731) + + PR c/31924 + * expr.c (interpret_float_suffix): Check for invalid suffix. + +2007-05-02 Eric Christopher (r124358) + + * expr.c (num_div_op): Don't overflow if the result is + zero. + +2007-05-02 Tom Tromey (r124356) + + PR preprocessor/28709: + * macro.c (paste_tokens): Remove PASTE_LEFT from the old lhs. + +2007-01-30 Tom Tromey (r121340) + + PR preprocessor/29966: + * macro.c (lex_expansion_token): Save and restore cpp_reader's + cur_token. + (_cpp_create_definition): Don't restore cur_token here. + * lex.c (_cpp_lex_token): Added assertion. + 2006-12-29 Ian Lance Taylor (r120263) * lex.c (_cpp_clean_line): Add uses of __builtin_expect. Don't diff --git a/contrib/gcclibs/libcpp/charset.c b/contrib/gcclibs/libcpp/charset.c index 6361f8c51..009106b06 100644 --- a/contrib/gcclibs/libcpp/charset.c +++ b/contrib/gcclibs/libcpp/charset.c @@ -1628,6 +1628,7 @@ _cpp_convert_input (cpp_reader *pfile, const char *input_charset, terminate with another \r, not an \n, so that we do not mistake the \r\n sequence for a single DOS line ending and erroneously issue the "No newline at end of file" diagnostic. */ + /* APPLE LOCAL don't access to.text[-1] radar 6121572 */ if (to.len > 0 && to.text[to.len - 1] == '\r') to.text[to.len] = '\r'; else diff --git a/contrib/gcclibs/libcpp/expr.c b/contrib/gcclibs/libcpp/expr.c index 24fcb1b86..ac7252f50 100644 --- a/contrib/gcclibs/libcpp/expr.c +++ b/contrib/gcclibs/libcpp/expr.c @@ -87,16 +87,19 @@ interpret_float_suffix (const uchar *s, size_t len) while (len--) switch (s[len]) { - case 'f': case 'F': f++; break; - case 'l': case 'L': l++; break; - case 'i': case 'I': - case 'j': case 'J': i++; break; - case 'd': case 'D': - /* Disallow fd, ld suffixes. */ - if (d && (f || l)) + case 'f': case 'F': + if (d > 0) + return 0; + f++; + break; + case 'l': case 'L': + if (d > 0) return 0; - d++; + l++; break; + case 'i': case 'I': + case 'j': case 'J': i++; break; + case 'd': case 'D': d++; break; default: return 0; } @@ -494,7 +497,7 @@ append_digit (cpp_num num, int digit, int base, size_t precision) if (add_low + digit < add_low) add_high++; add_low += digit; - + if (result.low + add_low < result.low) add_high++; if (result.high + add_high < result.high) @@ -1580,7 +1583,8 @@ num_div_op (cpp_reader *pfile, cpp_num lhs, cpp_num rhs, enum cpp_ttype op) { if (negate) result = num_negate (result, precision); - result.overflow = num_positive (result, precision) ^ !negate; + result.overflow = (num_positive (result, precision) ^ !negate + && !num_zerop (result)); } return result; diff --git a/contrib/gcclibs/libcpp/include/cpplib.h b/contrib/gcclibs/libcpp/include/cpplib.h index 5acef415c..ac596d678 100644 --- a/contrib/gcclibs/libcpp/include/cpplib.h +++ b/contrib/gcclibs/libcpp/include/cpplib.h @@ -320,6 +320,11 @@ struct cpp_options /* Nonzero means warn if there are any trigraphs. */ unsigned char warn_trigraphs; + /* APPLE LOCAL begin -Wnewline-eof 2001-08-23 --sts */ + /* Nonzero means warn if no newline at end of file. */ + unsigned char warn_newline_at_eof; + /* APPLE LOCAL end -Wnewline-eof 2001-08-23 --sts */ + /* Nonzero means warn about multicharacter charconsts. */ unsigned char warn_multichar; diff --git a/contrib/gcclibs/libcpp/init.c b/contrib/gcclibs/libcpp/init.c index 248d84f53..9620676a6 100644 --- a/contrib/gcclibs/libcpp/init.c +++ b/contrib/gcclibs/libcpp/init.c @@ -146,6 +146,10 @@ cpp_create_reader (enum c_lang lang, hash_table *table, pfile = XCNEW (cpp_reader); cpp_set_lang (pfile, lang); + /* APPLE LOCAL begin -Wnewline-eof 2001-08-23 --sts */ + /* Suppress warnings about missing newlines at ends of files. */ + CPP_OPTION (pfile, warn_newline_at_eof) = 0; + /* APPLE LOCAL end -Wnewline-eof 2001-08-23 --sts */ CPP_OPTION (pfile, warn_multichar) = 1; CPP_OPTION (pfile, discard_comments) = 1; CPP_OPTION (pfile, discard_comments_in_macro_exp) = 1; diff --git a/contrib/gcclibs/libcpp/lex.c b/contrib/gcclibs/libcpp/lex.c index 5d1a688af..1a3cad7ef 100644 --- a/contrib/gcclibs/libcpp/lex.c +++ b/contrib/gcclibs/libcpp/lex.c @@ -766,6 +766,11 @@ _cpp_lex_token (cpp_reader *pfile) pfile->cur_run = next_tokenrun (pfile->cur_run); pfile->cur_token = pfile->cur_run->base; } + /* We assume that the current token is somewhere in the current + run. */ + if (pfile->cur_token < pfile->cur_run->base + || pfile->cur_token >= pfile->cur_run->limit) + abort (); if (pfile->lookaheads) { @@ -847,11 +852,16 @@ _cpp_get_fresh_line (cpp_reader *pfile) && buffer->next_line > buffer->rlimit && !buffer->from_stage3) { - /* Only warn once. */ + /* Clip to buffer size. */ buffer->next_line = buffer->rlimit; - cpp_error_with_line (pfile, CPP_DL_PEDWARN, pfile->line_table->highest_line, - CPP_BUF_COLUMN (buffer, buffer->cur), - "no newline at end of file"); + /* APPLE LOCAL begin suppress no newline warning. */ + if ( CPP_OPTION (pfile, warn_newline_at_eof)) + { + cpp_error_with_line (pfile, CPP_DL_PEDWARN, pfile->line_table->highest_line, + CPP_BUF_COLUMN (buffer, buffer->cur), + "no newline at end of file"); + } + /* APPLE LOCAL end suppress no newline warning. */ } return_at_eof = buffer->return_at_eof; diff --git a/contrib/gcclibs/libcpp/macro.c b/contrib/gcclibs/libcpp/macro.c index d294f0442..e9d4681a3 100644 --- a/contrib/gcclibs/libcpp/macro.c +++ b/contrib/gcclibs/libcpp/macro.c @@ -1,6 +1,7 @@ /* Part of CPP library. (Macro and #define handling.) Copyright (C) 1986, 1987, 1989, 1992, 1993, 1994, 1995, 1996, 1998, - 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. + 1999, 2000, 2001, 2002, 2003, 2004, 2005, + 2006 Free Software Foundation, Inc. Written by Per Bothner, 1994. Based on CCCP program by Paul Rubin, June 1986 Adapted to ANSI C, Richard Stallman, Jan 1987 @@ -438,19 +439,18 @@ static bool paste_tokens (cpp_reader *pfile, const cpp_token **plhs, const cpp_token *rhs) { unsigned char *buf, *end, *lhsend; - const cpp_token *lhs; + cpp_token *lhs; unsigned int len; - lhs = *plhs; - len = cpp_token_len (lhs) + cpp_token_len (rhs) + 1; + len = cpp_token_len (*plhs) + cpp_token_len (rhs) + 1; buf = (unsigned char *) alloca (len); - end = lhsend = cpp_spell_token (pfile, lhs, buf, false); + end = lhsend = cpp_spell_token (pfile, *plhs, buf, false); /* Avoid comment headers, since they are still processed in stage 3. It is simpler to insert a space here, rather than modifying the lexer to ignore comments in some circumstances. Simply returning false doesn't work, since we want to clear the PASTE_LEFT flag. */ - if (lhs->type == CPP_DIV && rhs->type != CPP_EQ) + if ((*plhs)->type == CPP_DIV && rhs->type != CPP_EQ) *end++ = ' '; end = cpp_spell_token (pfile, rhs, end, false); *end = '\n'; @@ -460,13 +460,22 @@ paste_tokens (cpp_reader *pfile, const cpp_token **plhs, const cpp_token *rhs) /* Set pfile->cur_token as required by _cpp_lex_direct. */ pfile->cur_token = _cpp_temp_token (pfile); - *plhs = _cpp_lex_direct (pfile); + lhs = _cpp_lex_direct (pfile); if (pfile->buffer->cur != pfile->buffer->rlimit) { + source_location saved_loc = lhs->src_loc; + _cpp_pop_buffer (pfile); _cpp_backup_tokens (pfile, 1); *lhsend = '\0'; + /* We have to remove the PASTE_LEFT flag from the old lhs, but + we want to keep the new location. */ + *lhs = **plhs; + *plhs = lhs; + lhs->src_loc = saved_loc; + lhs->flags &= ~PASTE_LEFT; + /* Mandatory error for all apart from assembler. */ if (CPP_OPTION (pfile, lang) != CLK_ASM) cpp_error (pfile, CPP_DL_ERROR, @@ -475,6 +484,7 @@ paste_tokens (cpp_reader *pfile, const cpp_token **plhs, const cpp_token *rhs) return false; } + *plhs = lhs; _cpp_pop_buffer (pfile); return true; } @@ -1405,10 +1415,12 @@ alloc_expansion_token (cpp_reader *pfile, cpp_macro *macro) static cpp_token * lex_expansion_token (cpp_reader *pfile, cpp_macro *macro) { - cpp_token *token; + cpp_token *token, *saved_cur_token; + saved_cur_token = pfile->cur_token; pfile->cur_token = alloc_expansion_token (pfile, macro); token = _cpp_lex_direct (pfile); + pfile->cur_token = saved_cur_token; /* Is this a parameter? */ if (token->type == CPP_NAME @@ -1597,18 +1609,12 @@ _cpp_create_definition (cpp_reader *pfile, cpp_hashnode *node) ok = _cpp_create_trad_definition (pfile, macro); else { - cpp_token *saved_cur_token = pfile->cur_token; - ok = create_iso_definition (pfile, macro); - /* Restore lexer position because of games lex_expansion_token() - plays lexing the macro. We set the type for SEEN_EOL() in - directives.c. + /* We set the type for SEEN_EOL() in directives.c. Longer term we should lex the whole line before coming here, and just copy the expansion. */ - saved_cur_token[-1].type = pfile->cur_token[-1].type; - pfile->cur_token = saved_cur_token; /* Stop the lexer accepting __VA_ARGS__. */ pfile->state.va_args_ok = 0; diff --git a/contrib/gcclibs/libcpp/pch.c b/contrib/gcclibs/libcpp/pch.c index cc23b4ee9..624befd09 100644 --- a/contrib/gcclibs/libcpp/pch.c +++ b/contrib/gcclibs/libcpp/pch.c @@ -35,14 +35,14 @@ static int write_defs (cpp_reader *, cpp_hashnode *, void *); static int save_macros (cpp_reader *, cpp_hashnode *, void *); /* This structure represents a macro definition on disk. */ -struct macrodef_struct +struct macrodef_struct { unsigned int definition_length; unsigned short name_length; unsigned short flags; }; -/* This is how we write out a macro definition. +/* This is how we write out a macro definition. Suitable for being called by cpp_forall_identifiers. */ static int @@ -54,7 +54,7 @@ write_macdef (cpp_reader *pfile, cpp_hashnode *hn, void *file_p) case NT_VOID: if (! (hn->flags & NODE_POISONED)) return 1; - + case NT_MACRO: if ((hn->flags & NODE_BUILTIN)) return 1; @@ -76,7 +76,7 @@ write_macdef (cpp_reader *pfile, cpp_hashnode *hn, void *file_p) defn = NODE_NAME (hn); s.definition_length = s.name_length; } - + if (fwrite (&s, sizeof (s), 1, f) != 1 || fwrite (defn, 1, s.definition_length, f) != s.definition_length) { @@ -86,7 +86,7 @@ write_macdef (cpp_reader *pfile, cpp_hashnode *hn, void *file_p) } } return 1; - + case NT_ASSERTION: /* Not currently implemented. */ return 1; @@ -123,7 +123,7 @@ static int save_idents (cpp_reader *pfile ATTRIBUTE_UNUSED, cpp_hashnode *hn, void *ss_p) { struct cpp_savedstate *const ss = (struct cpp_savedstate *)ss_p; - + if (hn->type != NT_VOID) { struct cpp_string news; @@ -136,7 +136,7 @@ save_idents (cpp_reader *pfile ATTRIBUTE_UNUSED, cpp_hashnode *hn, void *ss_p) { struct cpp_string *sp; unsigned char *text; - + sp = XNEW (struct cpp_string); *slot = sp; @@ -157,7 +157,7 @@ hashmem (const void *p_p, size_t sz) const unsigned char *p = (const unsigned char *)p_p; size_t i; hashval_t h; - + h = 0; for (i = 0; i < sz; i++) h = h * 67 - (*p++ - 113); @@ -194,10 +194,10 @@ cpp_save_state (cpp_reader *r, FILE *f) { /* Save the list of non-void identifiers for the dependency checking. */ r->savedstate = XNEW (struct cpp_savedstate); - r->savedstate->definedhash = htab_create (100, cpp_string_hash, + r->savedstate->definedhash = htab_create (100, cpp_string_hash, cpp_string_eq, NULL); cpp_forall_identifiers (r, save_idents, r->savedstate); - + /* Write out the list of defined identifiers. */ cpp_forall_identifiers (r, write_macdef, f); @@ -210,20 +210,20 @@ static int count_defs (cpp_reader *pfile ATTRIBUTE_UNUSED, cpp_hashnode *hn, void *ss_p) { struct cpp_savedstate *const ss = (struct cpp_savedstate *)ss_p; - + switch (hn->type) { case NT_MACRO: if (hn->flags & NODE_BUILTIN) return 1; - + /* else fall through. */ case NT_VOID: { struct cpp_string news; void **slot; - + news.len = NODE_LEN (hn); news.text = NODE_NAME (hn); slot = (void **) htab_find (ss->definedhash, &news); @@ -249,20 +249,20 @@ static int write_defs (cpp_reader *pfile ATTRIBUTE_UNUSED, cpp_hashnode *hn, void *ss_p) { struct cpp_savedstate *const ss = (struct cpp_savedstate *)ss_p; - + switch (hn->type) { case NT_MACRO: if (hn->flags & NODE_BUILTIN) return 1; - + /* else fall through. */ case NT_VOID: { struct cpp_string news; void **slot; - + news.len = NODE_LEN (hn); news.text = NODE_NAME (hn); slot = (void **) htab_find (ss->definedhash, &news); @@ -303,7 +303,7 @@ cpp_write_pch_deps (cpp_reader *r, FILE *f) struct cpp_savedstate *const ss = r->savedstate; unsigned char *definedstrs; size_t i; - + /* Collect the list of identifiers which have been seen and weren't defined to anything previously. */ ss->hashsize = 0; @@ -404,7 +404,7 @@ collect_ht_nodes (cpp_reader *pfile ATTRIBUTE_UNUSED, cpp_hashnode *hn, with the preprocessor's current definitions. It will be consistent when: - - anything that was defined just before the PCH was generated + - anything that was defined just before the PCH was generated is defined the same way now; and - anything that was not defined then, but is defined now, was not used by the PCH. @@ -430,10 +430,10 @@ cpp_valid_state (cpp_reader *r, const char *name, int fd) { cpp_hashnode *h; const unsigned char *newdefn; - + if (read (fd, &m, sizeof (m)) != sizeof (m)) goto error; - + if (m.name_length == 0) break; @@ -453,10 +453,10 @@ cpp_valid_state (cpp_reader *r, const char *name, int fd) namebuf = XNEWVEC (unsigned char, namebufsz); } - if ((size_t)read (fd, namebuf, m.definition_length) + if ((size_t)read (fd, namebuf, m.definition_length) != m.definition_length) goto error; - + h = cpp_lookup (r, namebuf, m.name_length); if (m.flags & NODE_POISONED || h->type != NT_MACRO @@ -470,7 +470,7 @@ cpp_valid_state (cpp_reader *r, const char *name, int fd) } newdefn = cpp_macro_definition (r, h); - + if (m.definition_length != ustrlen (newdefn) || memcmp (namebuf, newdefn, m.definition_length) != 0) { @@ -498,17 +498,17 @@ cpp_valid_state (cpp_reader *r, const char *name, int fd) nl.defs = XNEWVEC (cpp_hashnode *, nl.asize); cpp_forall_identifiers (r, &collect_ht_nodes, &nl); qsort (nl.defs, nl.n_defs, sizeof (cpp_hashnode *), &comp_hashnodes); - + /* Loop through nl.defs and undeftab, both of which are sorted lists. There should be no matches. */ first = undeftab; last = undeftab + m.definition_length; i = 0; - + while (first < last && i < nl.n_defs) { int cmp = ustrcmp (first, NODE_NAME (nl.defs[i])); - + if (cmp < 0) first += ustrlen (first) + 1; else if (cmp > 0) @@ -516,13 +516,13 @@ cpp_valid_state (cpp_reader *r, const char *name, int fd) else { if (CPP_OPTION (r, warn_invalid_pch)) - cpp_error (r, CPP_DL_WARNING_SYSHDR, + cpp_error (r, CPP_DL_WARNING_SYSHDR, "%s: not used because `%s' is defined", name, first); goto fail; } } - + free(nl.defs); free (undeftab); @@ -545,7 +545,7 @@ cpp_valid_state (cpp_reader *r, const char *name, int fd) /* Save all the existing macros. */ -struct save_macro_data +struct save_macro_data { uchar **defns; size_t count; @@ -567,7 +567,7 @@ struct save_macro_data file were not saved in this way, but this is not done (yet), except for builtins, and for #assert by default. */ -static int +static int save_macros (cpp_reader *r, cpp_hashnode *h, void *data_p) { struct save_macro_data *data = (struct save_macro_data *)data_p; @@ -577,9 +577,9 @@ save_macros (cpp_reader *r, cpp_hashnode *h, void *data_p) if (data->count == data->array_size) { data->array_size *= 2; - data->defns = XRESIZEVEC (uchar *, data->defns, (data->array_size)); + data->defns = XRESIZEVEC (uchar *, data->defns, (data->array_size)); } - + switch (h->type) { case NT_ASSERTION: @@ -596,7 +596,7 @@ save_macros (cpp_reader *r, cpp_hashnode *h, void *data_p) data->defns[data->count][defnlen] = '\n'; } break; - + default: abort (); } @@ -612,7 +612,7 @@ void cpp_prepare_state (cpp_reader *r, struct save_macro_data **data) { struct save_macro_data *d = XNEW (struct save_macro_data); - + d->array_size = 512; d->defns = XNEWVEC (uchar *, d->array_size); d->count = 0; @@ -622,7 +622,7 @@ cpp_prepare_state (cpp_reader *r, struct save_macro_data **data) } /* Given a precompiled header that was previously determined to be valid, - apply all its definitions (and undefinitions) to the current state. + apply all its definitions (and undefinitions) to the current state. DEPNAME is passed to deps_restore. */ int @@ -632,7 +632,7 @@ cpp_read_state (cpp_reader *r, const char *name, FILE *f, size_t i; struct lexer_state old_state; - /* Restore spec_nodes, which will be full of references to the old + /* Restore spec_nodes, which will be full of references to the old hashtable entries and so will now be invalid. */ { struct spec_nodes *s = &r->spec_nodes; @@ -691,7 +691,7 @@ cpp_read_state (cpp_reader *r, const char *name, FILE *f, goto error; return 0; - + error: cpp_errno (r, CPP_DL_ERROR, "while reading precompiled header"); return -1; -- 2.45.0