Summary: | treelang doesn't use mapped locations | ||
---|---|---|---|
Product: | gcc | Reporter: | James A. Morrison <phython> |
Component: | treelang | Assignee: | Not yet assigned to anyone <unassigned> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | gcc-bugs |
Priority: | P2 | Keywords: | patch |
Version: | 4.0.0 | ||
Target Milestone: | 4.0.0 | ||
Host: | Target: | ||
Build: | Known to work: | ||
Known to fail: | Last reconfirmed: | 2004-10-01 03:24:56 | |
Attachments: | Make treelang work with --enable-mapped-location |
Description
James A. Morrison
2004-10-01 01:47:21 UTC
Created attachment 7249 [details]
Make treelang work with --enable-mapped-location
Patch posted here: <http://gcc.gnu.org/ml/gcc-patches/2004-10/msg00012.html>. Confirmed. Subject: Bug 17762 CVSROOT: /cvs/gcc Module name: gcc Changes by: phython@gcc.gnu.org 2004-10-02 18:38:30 Modified files: gcc/testsuite/treelang: ChangeLog gcc/testsuite/treelang/compile: var_defs.tree gcc/treelang : ChangeLog lex.l parse.y tree1.c treetree.c Added files: gcc/testsuite/treelang/compile: autofunc.tree badchar.tree externvar.tree mismatch.tree noproto.tree novar.tree Log message: 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. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/treelang/ChangeLog.diff?cvsroot=gcc&r1=1.5&r2=1.6 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/treelang/compile/autofunc.tree.diff?cvsroot=gcc&r1=NONE&r2=1.1 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/treelang/compile/badchar.tree.diff?cvsroot=gcc&r1=NONE&r2=1.1 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/treelang/compile/externvar.tree.diff?cvsroot=gcc&r1=NONE&r2=1.1 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/treelang/compile/mismatch.tree.diff?cvsroot=gcc&r1=NONE&r2=1.1 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/treelang/compile/noproto.tree.diff?cvsroot=gcc&r1=NONE&r2=1.1 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/treelang/compile/novar.tree.diff?cvsroot=gcc&r1=NONE&r2=1.1 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/treelang/compile/var_defs.tree.diff?cvsroot=gcc&r1=1.1&r2=1.2 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/treelang/ChangeLog.diff?cvsroot=gcc&r1=1.96&r2=1.97 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/treelang/lex.l.diff?cvsroot=gcc&r1=1.10&r2=1.11 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/treelang/parse.y.diff?cvsroot=gcc&r1=1.15&r2=1.16 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/treelang/tree1.c.diff?cvsroot=gcc&r1=1.19&r2=1.20 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/treelang/treetree.c.diff?cvsroot=gcc&r1=1.48&r2=1.49 Treelang now works with --enable-mapped-location. |