diff options
author | Volker Reichelt <reichelt@igpm.rwth-aachen.de> | 2006-02-13 22:00:35 +0000 |
---|---|---|
committer | Volker Reichelt <reichelt@gcc.gnu.org> | 2006-02-13 22:00:35 +0000 |
commit | ebf0088aec8584ae3fe0df08860b0842ac8e3920 (patch) | |
tree | 48ae71be03cea997248da051a750f773e5ae4a00 /gcc/cp/lex.c | |
parent | a7d6b7655606e2107da942ad0cc1df10ac4ead20 (diff) | |
download | gcc-ebf0088aec8584ae3fe0df08860b0842ac8e3920.zip gcc-ebf0088aec8584ae3fe0df08860b0842ac8e3920.tar.gz gcc-ebf0088aec8584ae3fe0df08860b0842ac8e3920.tar.bz2 |
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
Diffstat (limited to 'gcc/cp/lex.c')
-rw-r--r-- | gcc/cp/lex.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/gcc/cp/lex.c b/gcc/cp/lex.c index b3d8b60..5dbaf8b 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) |