re PR treelang/17762 (treelang doesn't use mapped locations)
authorJames A. Morrison <phython@gcc.gnu.org>
Sat, 2 Oct 2004 18:38:29 +0000 (18:38 +0000)
committerJames A. Morrison <phython@gcc.gnu.org>
Sat, 2 Oct 2004 18:38:29 +0000 (18:38 +0000)
commit34c4f8c7d8dedd5dd5ac7185d402b6c10003da19
tree4295da4da797ffaedddce69661349e32567f4598
parent039784fa0d28b1d5f816cdf66d9567208f6546f1
re PR treelang/17762 (treelang doesn't use mapped locations)

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.

From-SVN: r88430
13 files changed:
gcc/testsuite/treelang/ChangeLog
gcc/testsuite/treelang/compile/autofunc.tree [new file with mode: 0644]
gcc/testsuite/treelang/compile/badchar.tree [new file with mode: 0644]
gcc/testsuite/treelang/compile/externvar.tree [new file with mode: 0644]
gcc/testsuite/treelang/compile/mismatch.tree [new file with mode: 0644]
gcc/testsuite/treelang/compile/noproto.tree [new file with mode: 0644]
gcc/testsuite/treelang/compile/novar.tree [new file with mode: 0644]
gcc/testsuite/treelang/compile/var_defs.tree
gcc/treelang/ChangeLog
gcc/treelang/lex.l
gcc/treelang/parse.y
gcc/treelang/tree1.c
gcc/treelang/treetree.c