summaryrefslogtreecommitdiff
path: root/gcc/treelang/treetree.c
diff options
context:
space:
mode:
authorphython <phython@138bc75d-0d04-0410-961f-82ee72b054a4>2004-10-02 18:38:29 +0000
committerphython <phython@138bc75d-0d04-0410-961f-82ee72b054a4>2004-10-02 18:38:29 +0000
commitb991d49eaff458357a19c70fa016ba2a4bb53fb8 (patch)
tree4295da4da797ffaedddce69661349e32567f4598 /gcc/treelang/treetree.c
parent4b97c1145e585bf5461fa9bf8e6cd0f604976641 (diff)
downloadgcc-b991d49eaff458357a19c70fa016ba2a4bb53fb8.tar.gz
2004-10-02 James A. Morrison <phython@gcc.gnu.org>
PR other/17762 * lex.l: Include input.h and errors.h (lineno): New variable. (LINEMAP_POSITION_FOR_COLUMN): Define as noop when USE_MAPPED_LOCATION is not defined. Set column position with LINEMAP_POSITION_FOR_COLUMN. Use error instead of fprintf. Set input_location with the value returned by linemap_start_line when USE_MAPPED_LOCATION is defined. (dump_lex_value): Use LOCATION_LINE. * parse.y: Include errors.h. Use error and warning instead of fprintf. (return): Move exp to rule scope and always set to $2. Test against exp instead of $2. (init): Set $$ to $2. (print_token): Use LOCATION_LINE. * tree1.c (treelang_init): Call treelang_init_decl_processing last. Call linemap_add to set input_filename when USE_MAPPED_LOCATION is defined. (treelang_parse_file): Always start at line one. Rename input_filename to main_input_filename when USE_MAPPED_LOCATION is defined. Leave main_input_filename when done parsing the input. (insert_tree_name): Use error instead of fprintf. * treetree.c (tree_code_get_expression): Wrap long line. (tree_mark_addressable): Use %qD to print out DECLs. 2004-10-02 James A. Morrison <phython@gcc.gnu.org> * compile/autofunc.tree: New File. * compile/badchar.tree: New File. * compile/externvar.tree: New File. * compile/mismatch.tree: New File. * compile/noproto.tree: New File. * compile/novar.tree: New File. * compile/var_defs.tree: Add duplicate variable. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@88430 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/treelang/treetree.c')
-rw-r--r--gcc/treelang/treetree.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/gcc/treelang/treetree.c b/gcc/treelang/treetree.c
index ade0d9d99c7..adcda4398a8 100644
--- a/gcc/treelang/treetree.c
+++ b/gcc/treelang/treetree.c
@@ -686,7 +686,9 @@ tree_code_get_expression (unsigned int exp_type,
gcc_assert (op1 && op2);
operator = MODIFY_EXPR;
ret1 = fold (build2 (operator, void_type_node, op1,
- fold (build1 (CONVERT_EXPR, TREE_TYPE (op1), op2))));
+ fold (build1 (CONVERT_EXPR, TREE_TYPE (op1),
+ op2))));
+
break;
case EXP_PLUS:
@@ -837,24 +839,22 @@ tree_mark_addressable (tree exp)
{
if (TREE_PUBLIC (x))
{
- error ("global register variable `%s' used in nested function",
- IDENTIFIER_POINTER (DECL_NAME (x)));
+ error ("Global register variable %qD used in nested function.",
+ x);
return 0;
}
- pedwarn ("register variable `%s' used in nested function",
- IDENTIFIER_POINTER (DECL_NAME (x)));
+ pedwarn ("Register variable %qD used in nested function.", x);
}
else if (DECL_REGISTER (x) && !TREE_ADDRESSABLE (x))
{
if (TREE_PUBLIC (x))
{
- error ("address of global register variable `%s' requested",
- IDENTIFIER_POINTER (DECL_NAME (x)));
+ error ("Address of global register variable %qD requested.",
+ x);
return 0;
}
- pedwarn ("address of register variable `%s' requested",
- IDENTIFIER_POINTER (DECL_NAME (x)));
+ pedwarn ("Address of register variable %qD requested.", x);
}
/* drops in */