diff options
-rw-r--r-- | gcc/ChangeLog | 10 | ||||
-rw-r--r-- | gcc/c-lex.c | 2 | ||||
-rw-r--r-- | gcc/c-pch.c | 2 | ||||
-rw-r--r-- | gcc/c-pragma.c | 40 | ||||
-rw-r--r-- | gcc/c-pragma.h | 2 | ||||
-rw-r--r-- | gcc/config/c4x/c4x-c.c | 12 | ||||
-rw-r--r-- | gcc/config/darwin-c.c | 16 | ||||
-rw-r--r-- | gcc/config/ia64/ia64-c.c | 6 | ||||
-rw-r--r-- | gcc/config/m32c/m32c-pragma.c | 4 | ||||
-rw-r--r-- | gcc/config/rs6000/rs6000-c.c | 8 | ||||
-rw-r--r-- | gcc/config/sol2-c.c | 32 | ||||
-rw-r--r-- | gcc/config/v850/v850-c.c | 22 | ||||
-rw-r--r-- | gcc/cp/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/cp/lex.c | 6 | ||||
-rw-r--r-- | gcc/cp/parser.c | 6 | ||||
-rw-r--r-- | gcc/doc/tm.texi | 8 |
16 files changed, 98 insertions, 83 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index cc7b153..0ee870d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,13 @@ +2005-11-26 Richard Henderson <rth@redhat.com> + + * c-lex.c (pragma_lex): Rename from c_lex. + * c-pch.c: Update for pragma_lex rename. + * c-pragma.c, c-pragma.h, config/ia64/ia64-c.c: Likewise. + * config/m32c/m32c-pragma.c, config/darwin-c.c: Likewise. + * config/rs6000/rs6000-c.c, config/c4x/c4x-c.c: Likewise. + * config/sol2-c.c, config/v850/v850-c.c: Likewise. + * doc/tm.texi: Likewise. + 2005-11-26 Andrew Pinski <pinskia@physics.uc.edu> PR middle-end/23669 diff --git a/gcc/c-lex.c b/gcc/c-lex.c index 1c832c5..4ceb6e4 100644 --- a/gcc/c-lex.c +++ b/gcc/c-lex.c @@ -486,7 +486,7 @@ c_lex_with_flags (tree *value, location_t *loc, unsigned char *cpp_flags) } enum cpp_ttype -c_lex (tree *value) +pragma_lex (tree *value) { location_t loc; return c_lex_with_flags (value, &loc, NULL); diff --git a/gcc/c-pch.c b/gcc/c-pch.c index d066b65..dd7e5e7 100644 --- a/gcc/c-pch.c +++ b/gcc/c-pch.c @@ -447,7 +447,7 @@ c_common_pch_pragma (cpp_reader *pfile) const char *name; int fd; - if (c_lex (&name_t) != CPP_STRING) + if (pragma_lex (&name_t) != CPP_STRING) { error ("malformed #pragma GCC pch_preprocess, ignored"); return; diff --git a/gcc/c-pragma.c b/gcc/c-pragma.c index 1407a11..be762f2 100644 --- a/gcc/c-pragma.c +++ b/gcc/c-pragma.c @@ -147,10 +147,10 @@ handle_pragma_pack (cpp_reader * ARG_UNUSED (dummy)) enum cpp_ttype token; enum { set, push, pop } action; - if (c_lex (&x) != CPP_OPEN_PAREN) + if (pragma_lex (&x) != CPP_OPEN_PAREN) GCC_BAD ("missing %<(%> after %<#pragma pack%> - ignored"); - token = c_lex (&x); + token = pragma_lex (&x); if (token == CPP_CLOSE_PAREN) { action = set; @@ -160,7 +160,7 @@ handle_pragma_pack (cpp_reader * ARG_UNUSED (dummy)) { align = TREE_INT_CST_LOW (x); action = set; - if (c_lex (&x) != CPP_CLOSE_PAREN) + if (pragma_lex (&x) != CPP_CLOSE_PAREN) GCC_BAD ("malformed %<#pragma pack%> - ignored"); } else if (token == CPP_NAME) @@ -179,9 +179,9 @@ handle_pragma_pack (cpp_reader * ARG_UNUSED (dummy)) else GCC_BAD2 ("unknown action %qs for %<#pragma pack%> - ignored", op); - while ((token = c_lex (&x)) == CPP_COMMA) + while ((token = pragma_lex (&x)) == CPP_COMMA) { - token = c_lex (&x); + token = pragma_lex (&x); if (token == CPP_NAME && id == 0) { id = x; @@ -203,7 +203,7 @@ handle_pragma_pack (cpp_reader * ARG_UNUSED (dummy)) else GCC_BAD ("malformed %<#pragma pack%> - ignored"); - if (c_lex (&x) != CPP_EOF) + if (pragma_lex (&x) != CPP_EOF) warning (OPT_Wpragmas, "junk at end of %<#pragma pack%>"); if (flag_pack_struct) @@ -333,14 +333,14 @@ handle_pragma_weak (cpp_reader * ARG_UNUSED (dummy)) value = 0; - if (c_lex (&name) != CPP_NAME) + if (pragma_lex (&name) != CPP_NAME) GCC_BAD ("malformed #pragma weak, ignored"); - t = c_lex (&x); + t = pragma_lex (&x); if (t == CPP_EQ) { - if (c_lex (&value) != CPP_NAME) + if (pragma_lex (&value) != CPP_NAME) GCC_BAD ("malformed #pragma weak, ignored"); - t = c_lex (&x); + t = pragma_lex (&x); } if (t != CPP_EOF) warning (OPT_Wpragmas, "junk at end of #pragma weak"); @@ -410,11 +410,11 @@ handle_pragma_redefine_extname (cpp_reader * ARG_UNUSED (dummy)) tree oldname, newname, decl, x; enum cpp_ttype t; - if (c_lex (&oldname) != CPP_NAME) + if (pragma_lex (&oldname) != CPP_NAME) GCC_BAD ("malformed #pragma redefine_extname, ignored"); - if (c_lex (&newname) != CPP_NAME) + if (pragma_lex (&newname) != CPP_NAME) GCC_BAD ("malformed #pragma redefine_extname, ignored"); - t = c_lex (&x); + t = pragma_lex (&x); if (t != CPP_EOF) warning (OPT_Wpragmas, "junk at end of #pragma redefine_extname"); @@ -480,9 +480,9 @@ handle_pragma_extern_prefix (cpp_reader * ARG_UNUSED (dummy)) tree prefix, x; enum cpp_ttype t; - if (c_lex (&prefix) != CPP_STRING) + if (pragma_lex (&prefix) != CPP_STRING) GCC_BAD ("malformed #pragma extern_prefix, ignored"); - t = c_lex (&x); + t = pragma_lex (&x); if (t != CPP_EOF) warning (OPT_Wpragmas, "junk at end of #pragma extern_prefix"); @@ -603,7 +603,7 @@ handle_pragma_visibility (cpp_reader *dummy ATTRIBUTE_UNUSED) enum { bad, push, pop } action = bad; static VEC (visibility, heap) *visstack; - token = c_lex (&x); + token = pragma_lex (&x); if (token == CPP_NAME) { const char *op = IDENTIFIER_POINTER (x); @@ -631,9 +631,9 @@ handle_pragma_visibility (cpp_reader *dummy ATTRIBUTE_UNUSED) } else { - if (c_lex (&x) != CPP_OPEN_PAREN) + if (pragma_lex (&x) != CPP_OPEN_PAREN) GCC_BAD ("missing %<(%> after %<#pragma GCC visibility push%> - ignored"); - token = c_lex (&x); + token = pragma_lex (&x); if (token != CPP_NAME) { GCC_BAD ("malformed #pragma GCC visibility push"); @@ -657,11 +657,11 @@ handle_pragma_visibility (cpp_reader *dummy ATTRIBUTE_UNUSED) } visibility_options.inpragma = 1; } - if (c_lex (&x) != CPP_CLOSE_PAREN) + if (pragma_lex (&x) != CPP_CLOSE_PAREN) GCC_BAD ("missing %<(%> after %<#pragma GCC visibility push%> - ignored"); } } - if (c_lex (&x) != CPP_EOF) + if (pragma_lex (&x) != CPP_EOF) warning (OPT_Wpragmas, "junk at end of %<#pragma GCC visibility%>"); } diff --git a/gcc/c-pragma.h b/gcc/c-pragma.h index 749782d..057aca6 100644 --- a/gcc/c-pragma.h +++ b/gcc/c-pragma.h @@ -64,7 +64,7 @@ extern void maybe_apply_pending_pragma_weaks (void); extern tree maybe_apply_renaming_pragma (tree, tree); extern void add_to_renaming_pragma_list (tree, tree); -extern enum cpp_ttype c_lex (tree *); +extern enum cpp_ttype pragma_lex (tree *); extern enum cpp_ttype c_lex_with_flags (tree *, location_t *, unsigned char *); /* If 1, then lex strings into the execution character set. diff --git a/gcc/config/c4x/c4x-c.c b/gcc/config/c4x/c4x-c.c index fe3a922..d0de53a 100644 --- a/gcc/config/c4x/c4x-c.c +++ b/gcc/config/c4x/c4x-c.c @@ -68,25 +68,25 @@ c4x_parse_pragma (name, func, sect) { tree f, s, x; - if (c_lex (&x) != CPP_OPEN_PAREN) + if (pragma_lex (&x) != CPP_OPEN_PAREN) BAD ("missing '(' after '#pragma %s' - ignored", name); - if (c_lex (&f) != CPP_NAME) + if (pragma_lex (&f) != CPP_NAME) BAD ("missing function name in '#pragma %s' - ignored", name); if (sect) { - if (c_lex (&x) != CPP_COMMA) + if (pragma_lex (&x) != CPP_COMMA) BAD ("malformed '#pragma %s' - ignored", name); - if (c_lex (&s) != CPP_STRING) + if (pragma_lex (&s) != CPP_STRING) BAD ("missing section name in '#pragma %s' - ignored", name); *sect = s; } - if (c_lex (&x) != CPP_CLOSE_PAREN) + if (pragma_lex (&x) != CPP_CLOSE_PAREN) BAD ("missing ')' for '#pragma %s' - ignored", name); - if (c_lex (&x) != CPP_EOF) + if (pragma_lex (&x) != CPP_EOF) warning (OPT_Wpragmas, "junk at end of '#pragma %s'", name); *func = f; diff --git a/gcc/config/darwin-c.c b/gcc/config/darwin-c.c index d044deb..36b03c4 100644 --- a/gcc/config/darwin-c.c +++ b/gcc/config/darwin-c.c @@ -102,17 +102,17 @@ darwin_pragma_options (cpp_reader *pfile ATTRIBUTE_UNUSED) const char *arg; tree t, x; - if (c_lex (&t) != CPP_NAME) + if (pragma_lex (&t) != CPP_NAME) BAD ("malformed '#pragma options', ignoring"); arg = IDENTIFIER_POINTER (t); if (strcmp (arg, "align")) BAD ("malformed '#pragma options', ignoring"); - if (c_lex (&t) != CPP_EQ) + if (pragma_lex (&t) != CPP_EQ) BAD ("malformed '#pragma options', ignoring"); - if (c_lex (&t) != CPP_NAME) + if (pragma_lex (&t) != CPP_NAME) BAD ("malformed '#pragma options', ignoring"); - if (c_lex (&x) != CPP_EOF) + if (pragma_lex (&x) != CPP_EOF) warning (0, "junk at end of '#pragma options'"); arg = IDENTIFIER_POINTER (t); @@ -134,19 +134,19 @@ darwin_pragma_unused (cpp_reader *pfile ATTRIBUTE_UNUSED) tree decl, x; int tok; - if (c_lex (&x) != CPP_OPEN_PAREN) + if (pragma_lex (&x) != CPP_OPEN_PAREN) BAD ("missing '(' after '#pragma unused', ignoring"); while (1) { - tok = c_lex (&decl); + tok = pragma_lex (&decl); if (tok == CPP_NAME && decl) { tree local = lookup_name (decl); if (local && (TREE_CODE (local) == PARM_DECL || TREE_CODE (local) == VAR_DECL)) TREE_USED (local) = 1; - tok = c_lex (&x); + tok = pragma_lex (&x); if (tok != CPP_COMMA) break; } @@ -155,7 +155,7 @@ darwin_pragma_unused (cpp_reader *pfile ATTRIBUTE_UNUSED) if (tok != CPP_CLOSE_PAREN) BAD ("missing ')' after '#pragma unused', ignoring"); - if (c_lex (&x) != CPP_EOF) + if (pragma_lex (&x) != CPP_EOF) warning (0, "junk at end of '#pragma unused'"); } diff --git a/gcc/config/ia64/ia64-c.c b/gcc/config/ia64/ia64-c.c index d51a98d..9bb2a80 100644 --- a/gcc/config/ia64/ia64-c.c +++ b/gcc/config/ia64/ia64-c.c @@ -40,13 +40,13 @@ ia64_hpux_handle_builtin_pragma (cpp_reader *pfile ATTRIBUTE_UNUSED) enum cpp_ttype type; tree x; - type = c_lex (&x); + type = pragma_lex (&x); while (type == CPP_NAME) { ia64_hpux_add_pragma_builtin (x); - type = c_lex (&x); + type = pragma_lex (&x); if (type == CPP_COMMA) - type = c_lex (&x); + type = pragma_lex (&x); } if (type != CPP_EOF) warning (OPT_Wpragmas, "malformed #pragma builtin"); diff --git a/gcc/config/m32c/m32c-pragma.c b/gcc/config/m32c/m32c-pragma.c index 2360878..b468388 100644 --- a/gcc/config/m32c/m32c-pragma.c +++ b/gcc/config/m32c/m32c-pragma.c @@ -52,14 +52,14 @@ m32c_pragma_memregs (cpp_reader * reader ATTRIBUTE_UNUSED) HOST_WIDE_INT i; static char new_number[3]; - type = c_lex (&val); + type = pragma_lex (&val); if (type == CPP_NUMBER) { if (host_integerp (val, 1)) { i = tree_low_cst (val, 1); - type = c_lex (&val); + type = pragma_lex (&val); if (type != CPP_EOF) warning (0, "junk at end of #pragma GCC memregs [0..16]"); diff --git a/gcc/config/rs6000/rs6000-c.c b/gcc/config/rs6000/rs6000-c.c index ecd403d..67416c2 100644 --- a/gcc/config/rs6000/rs6000-c.c +++ b/gcc/config/rs6000/rs6000-c.c @@ -62,17 +62,17 @@ rs6000_pragma_longcall (cpp_reader *pfile ATTRIBUTE_UNUSED) /* If we get here, generic code has already scanned the directive leader and the word "longcall". */ - if (c_lex (&x) != CPP_OPEN_PAREN) + if (pragma_lex (&x) != CPP_OPEN_PAREN) SYNTAX_ERROR ("missing open paren"); - if (c_lex (&n) != CPP_NUMBER) + if (pragma_lex (&n) != CPP_NUMBER) SYNTAX_ERROR ("missing number"); - if (c_lex (&x) != CPP_CLOSE_PAREN) + if (pragma_lex (&x) != CPP_CLOSE_PAREN) SYNTAX_ERROR ("missing close paren"); if (n != integer_zero_node && n != integer_one_node) SYNTAX_ERROR ("number must be 0 or 1"); - if (c_lex (&x) != CPP_EOF) + if (pragma_lex (&x) != CPP_EOF) warning (OPT_Wpragmas, "junk at end of #pragma longcall"); rs6000_default_long_calls = (n == integer_one_node); diff --git a/gcc/config/sol2-c.c b/gcc/config/sol2-c.c index 1934270..173583b 100644 --- a/gcc/config/sol2-c.c +++ b/gcc/config/sol2-c.c @@ -88,8 +88,8 @@ solaris_pragma_align (cpp_reader *pfile ATTRIBUTE_UNUSED) enum cpp_ttype ttype; HOST_WIDE_INT low; - if (c_lex (&x) != CPP_NUMBER - || c_lex (&t) != CPP_OPEN_PAREN) + if (pragma_lex (&x) != CPP_NUMBER + || pragma_lex (&t) != CPP_OPEN_PAREN) { warning (0, "malformed %<#pragma align%>, ignoring"); return; @@ -104,7 +104,7 @@ solaris_pragma_align (cpp_reader *pfile ATTRIBUTE_UNUSED) return; } - ttype = c_lex (&t); + ttype = pragma_lex (&t); if (ttype != CPP_NAME) { warning (0, "malformed %<#pragma align%>, ignoring"); @@ -121,10 +121,10 @@ solaris_pragma_align (cpp_reader *pfile ATTRIBUTE_UNUSED) solaris_pending_aligns = tree_cons (t, build_tree_list (NULL, x), solaris_pending_aligns); - ttype = c_lex (&t); + ttype = pragma_lex (&t); if (ttype == CPP_COMMA) { - ttype = c_lex (&t); + ttype = pragma_lex (&t); if (ttype != CPP_NAME) { warning (0, "malformed %<#pragma align%>"); @@ -133,7 +133,7 @@ solaris_pragma_align (cpp_reader *pfile ATTRIBUTE_UNUSED) } else if (ttype == CPP_CLOSE_PAREN) { - if (c_lex (&t) != CPP_EOF) + if (pragma_lex (&t) != CPP_EOF) warning (0, "junk at end of %<#pragma align%>"); return; } @@ -153,13 +153,13 @@ solaris_pragma_init (cpp_reader *pfile ATTRIBUTE_UNUSED) tree t; enum cpp_ttype ttype; - if (c_lex (&t) != CPP_OPEN_PAREN) + if (pragma_lex (&t) != CPP_OPEN_PAREN) { warning (0, "malformed %<#pragma init%>, ignoring"); return; } - ttype = c_lex (&t); + ttype = pragma_lex (&t); if (ttype != CPP_NAME) { warning (0, "malformed %<#pragma init%>, ignoring"); @@ -179,10 +179,10 @@ solaris_pragma_init (cpp_reader *pfile ATTRIBUTE_UNUSED) else solaris_pending_inits = tree_cons (t, NULL, solaris_pending_inits); - ttype = c_lex (&t); + ttype = pragma_lex (&t); if (ttype == CPP_COMMA) { - ttype = c_lex (&t); + ttype = pragma_lex (&t); if (ttype != CPP_NAME) { warning (0, "malformed %<#pragma init%>"); @@ -191,7 +191,7 @@ solaris_pragma_init (cpp_reader *pfile ATTRIBUTE_UNUSED) } else if (ttype == CPP_CLOSE_PAREN) { - if (c_lex (&t) != CPP_EOF) + if (pragma_lex (&t) != CPP_EOF) warning (0, "junk at end of %<#pragma init%>"); return; } @@ -211,13 +211,13 @@ solaris_pragma_fini (cpp_reader *pfile ATTRIBUTE_UNUSED) tree t; enum cpp_ttype ttype; - if (c_lex (&t) != CPP_OPEN_PAREN) + if (pragma_lex (&t) != CPP_OPEN_PAREN) { warning (0, "malformed %<#pragma fini%>, ignoring"); return; } - ttype = c_lex (&t); + ttype = pragma_lex (&t); if (ttype != CPP_NAME) { warning (0, "malformed %<#pragma fini%>, ignoring"); @@ -237,10 +237,10 @@ solaris_pragma_fini (cpp_reader *pfile ATTRIBUTE_UNUSED) else solaris_pending_finis = tree_cons (t, NULL, solaris_pending_finis); - ttype = c_lex (&t); + ttype = pragma_lex (&t); if (ttype == CPP_COMMA) { - ttype = c_lex (&t); + ttype = pragma_lex (&t); if (ttype != CPP_NAME) { warning (0, "malformed %<#pragma fini%>"); @@ -249,7 +249,7 @@ solaris_pragma_fini (cpp_reader *pfile ATTRIBUTE_UNUSED) } else if (ttype == CPP_CLOSE_PAREN) { - if (c_lex (&t) != CPP_EOF) + if (pragma_lex (&t) != CPP_EOF) warning (0, "junk at end of %<#pragma fini%>"); return; } diff --git a/gcc/config/v850/v850-c.c b/gcc/config/v850/v850-c.c index cbb86cd..0dbeb2e 100644 --- a/gcc/config/v850/v850-c.c +++ b/gcc/config/v850/v850-c.c @@ -125,7 +125,7 @@ ghs_pragma_section (cpp_reader * pfile ATTRIBUTE_UNUSED) const char *sect, *alias; enum GHS_section_kind kind; - type = c_lex (&x); + type = pragma_lex (&x); if (type == CPP_EOF && !repeat) goto reset; @@ -135,14 +135,14 @@ ghs_pragma_section (cpp_reader * pfile ATTRIBUTE_UNUSED) goto bad; repeat = 0; - if (c_lex (&x) != CPP_EQ) + if (pragma_lex (&x) != CPP_EQ) goto bad; - if (c_lex (&x) != CPP_NAME) + if (pragma_lex (&x) != CPP_NAME) goto bad; alias = IDENTIFIER_POINTER (x); - type = c_lex (&x); + type = pragma_lex (&x); if (type == CPP_COMMA) repeat = 1; else if (type != CPP_EOF) @@ -196,7 +196,7 @@ ghs_pragma_interrupt (cpp_reader * pfile ATTRIBUTE_UNUSED) { tree x; - if (c_lex (&x) != CPP_EOF) + if (pragma_lex (&x) != CPP_EOF) warning (OPT_Wpragmas, "junk at end of #pragma ghs interrupt"); mark_current_function_as_interrupt (); @@ -207,7 +207,7 @@ ghs_pragma_starttda (cpp_reader * pfile ATTRIBUTE_UNUSED) { tree x; - if (c_lex (&x) != CPP_EOF) + if (pragma_lex (&x) != CPP_EOF) warning (OPT_Wpragmas, "junk at end of #pragma ghs starttda"); push_data_area (DATA_AREA_TDA); @@ -218,7 +218,7 @@ ghs_pragma_startsda (cpp_reader * pfile ATTRIBUTE_UNUSED) { tree x; - if (c_lex (&x) != CPP_EOF) + if (pragma_lex (&x) != CPP_EOF) warning (OPT_Wpragmas, "junk at end of #pragma ghs startsda"); push_data_area (DATA_AREA_SDA); @@ -229,7 +229,7 @@ ghs_pragma_startzda (cpp_reader * pfile ATTRIBUTE_UNUSED) { tree x; - if (c_lex (&x) != CPP_EOF) + if (pragma_lex (&x) != CPP_EOF) warning (OPT_Wpragmas, "junk at end of #pragma ghs startzda"); push_data_area (DATA_AREA_ZDA); @@ -240,7 +240,7 @@ ghs_pragma_endtda (cpp_reader * pfile ATTRIBUTE_UNUSED) { tree x; - if (c_lex (&x) != CPP_EOF) + if (pragma_lex (&x) != CPP_EOF) warning (OPT_Wpragmas, "junk at end of #pragma ghs endtda"); pop_data_area (DATA_AREA_TDA); @@ -251,7 +251,7 @@ ghs_pragma_endsda (cpp_reader * pfile ATTRIBUTE_UNUSED) { tree x; - if (c_lex (&x) != CPP_EOF) + if (pragma_lex (&x) != CPP_EOF) warning (OPT_Wpragmas, "junk at end of #pragma ghs endsda"); pop_data_area (DATA_AREA_SDA); @@ -262,7 +262,7 @@ ghs_pragma_endzda (cpp_reader * pfile ATTRIBUTE_UNUSED) { tree x; - if (c_lex (&x) != CPP_EOF) + if (pragma_lex (&x) != CPP_EOF) warning (OPT_Wpragmas, "junk at end of #pragma ghs endzda"); pop_data_area (DATA_AREA_ZDA); diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 5e5df9b..b6936aa 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2005-11-26 Richard Henderson <rth@redhat.com> + + * lex.c: Update for pragma_lex rename. + * parser.c: Likewise. + 2005-11-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de> PR c++/9278 diff --git a/gcc/cp/lex.c b/gcc/cp/lex.c index ce56265..4ed1077 100644 --- a/gcc/cp/lex.c +++ b/gcc/cp/lex.c @@ -460,11 +460,11 @@ parse_strconst_pragma (const char* name, int opt) tree result, x; enum cpp_ttype t; - t = c_lex (&x); + t = pragma_lex (&x); if (t == CPP_STRING) { result = x; - if (c_lex (&x) != CPP_EOF) + if (pragma_lex (&x) != CPP_EOF) warning (0, "junk at end of #pragma %s", name); return result; } @@ -583,7 +583,7 @@ static void handle_pragma_java_exceptions (cpp_reader* dfile ATTRIBUTE_UNUSED ) { tree x; - if (c_lex (&x) != CPP_EOF) + if (pragma_lex (&x) != CPP_EOF) warning (0, "junk at end of #pragma GCC java_exceptions"); choose_personality_routine (lang_java); diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index 5827e5e..0ea0f93 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -254,7 +254,7 @@ cp_lexer_new_main (void) /* Tell cpplib we want CPP_PRAGMA tokens. */ cpp_get_options (parse_in)->defer_pragmas = true; - /* Tell c_lex not to merge string constants. */ + /* Tell pragma_lex not to merge string constants. */ c_lex_return_raw_strings = true; c_common_no_more_pch (); @@ -297,8 +297,8 @@ cp_lexer_new_main (void) lexer->next_token = lexer->buffer_length ? buffer : (cp_token *)&eof_token; /* Pragma processing (via cpp_handle_deferred_pragma) may result in - direct calls to c_lex. Those callers all expect c_lex to do - string constant concatenation. */ + direct calls to pragma_lex. Those callers all expect pragma_lex + to do string constant concatenation. */ c_lex_return_raw_strings = false; /* Subsequent preprocessor diagnostics should use compiler diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi index b736855..35bd5c3 100644 --- a/gcc/doc/tm.texi +++ b/gcc/doc/tm.texi @@ -9160,7 +9160,7 @@ pragma of the form @code{NULL} to put the pragma in the global namespace. The callback routine receives @var{pfile} as its first argument, which can be passed on to cpplib's functions if necessary. You can lex tokens after the -@var{name} by calling @code{c_lex}. Tokens that are not read by the +@var{name} by calling @code{pragma_lex}. Tokens that are not read by the callback will be silently ignored. The end of the line is indicated by a token of type @code{CPP_EOF}. Macro expansion occurs on the arguments of pragmas registered with @@ -9170,15 +9170,15 @@ pragmas registered with @code{c_register_pragma}. For an example use of this routine, see @file{c4x.h} and the callback routines defined in @file{c4x-c.c}. -Note that the use of @code{c_lex} is specific to the C and C++ +Note that the use of @code{pragma_lex} is specific to the C and C++ compilers. It will not work in the Java or Fortran compilers, or any -other language compilers for that matter. Thus if @code{c_lex} is going +other language compilers for that matter. Thus if @code{pragma_lex} is going to be called from target-specific code, it must only be done so when building the C and C++ compilers. This can be done by defining the variables @code{c_target_objs} and @code{cxx_target_objs} in the target entry in the @file{config.gcc} file. These variables should name the target-specific, language-specific object file which contains the -code that uses @code{c_lex}. Note it will also be necessary to add a +code that uses @code{pragma_lex}. Note it will also be necessary to add a rule to the makefile fragment pointed to by @code{tmake_file} that shows how to build this object file. @end deftypefun |