"(tree)-1" to indicate failure. Simplify.
(handle_pragma_interface): Test for error_mark_node instead of
"(tree)-1".
(handle_pragma_implementation): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@110932
138bc75d-0d04-0410-961f-
82ee72b054a4
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'.
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
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);
const char *filename;
struct impl_files *ifiles = impl_file_chain;
- if (fname == (tree)-1)
+ if (fname == error_mark_node)
return;
if (fname == 0)