Commit ebf0088a by Volker Reichelt Committed by Volker Reichelt

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
parent a7d6b765
2006-02-13 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
* 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 <reichelt@igpm.rwth-aachen.de>
PR c++/26151
* parser.c (cp_parser_decl_specifier_seq): Check for duplicate
decl-specifiers. Remove extra check for duplicate 'friend'.
......
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment