From: Volker Reichelt Date: Mon, 13 Feb 2006 22:00:35 +0000 (+0000) Subject: lex.c (parse_strconst_pragma): Return error_mark_node instead of "(tree)-1" to indica... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ebf0088aec8584ae3fe0df08860b0842ac8e3920;p=gcc.git lex.c (parse_strconst_pragma): Return error_mark_node instead of "(tree)-1" to indicate failure. * lex.c (parse_strconst_pragma): Return error_mark_node instead of "(tree)-1" to indicate failure. Simplify. (handle_pragma_interface): Test for error_mark_node instead of "(tree)-1". (handle_pragma_implementation): Likewise. From-SVN: r110932 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index fc53be07e7c..925c33204cf 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,11 @@ +2006-02-13 Volker Reichelt + + * lex.c (parse_strconst_pragma): Return error_mark_node instead of + "(tree)-1" to indicate failure. Simplify. + (handle_pragma_interface): Test for error_mark_node instead of + "(tree)-1". + (handle_pragma_implementation): Likewise. + 2006-02-13 Volker Reichelt PR c++/26151 diff --git a/gcc/cp/lex.c b/gcc/cp/lex.c index b3d8b608f75..5dbaf8b0464 100644 --- a/gcc/cp/lex.c +++ b/gcc/cp/lex.c @@ -460,20 +460,19 @@ parse_strconst_pragma (const char* name, int opt) tree result, x; enum cpp_ttype t; - t = pragma_lex (&x); + t = pragma_lex (&result); if (t == CPP_STRING) { - result = x; if (pragma_lex (&x) != CPP_EOF) warning (0, "junk at end of #pragma %s", name); return result; } if (t == CPP_EOF && opt) - return 0; + return NULL_TREE; error ("invalid #pragma %s", name); - return (tree)-1; + return error_mark_node; } static void @@ -497,7 +496,7 @@ handle_pragma_interface (cpp_reader* dfile ATTRIBUTE_UNUSED ) struct c_fileinfo *finfo; const char *filename; - if (fname == (tree)-1) + if (fname == error_mark_node) return; else if (fname == 0) filename = lbasename (input_filename); @@ -537,7 +536,7 @@ handle_pragma_implementation (cpp_reader* dfile ATTRIBUTE_UNUSED ) const char *filename; struct impl_files *ifiles = impl_file_chain; - if (fname == (tree)-1) + if (fname == error_mark_node) return; if (fname == 0)