Bug 17762 - treelang doesn't use mapped locations
Summary: treelang doesn't use mapped locations
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: treelang (show other bugs)
Version: 4.0.0
: P2 normal
Target Milestone: 4.0.0
Assignee: Not yet assigned to anyone
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2004-10-01 01:47 UTC by James A. Morrison
Modified: 2005-03-04 23:17 UTC (History)
1 user (show)

See Also:
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 (9.37 KB, patch)
2004-10-01 01:48 UTC, James A. Morrison
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description James A. Morrison 2004-10-01 01:47:21 UTC
Treelang does not use mapped locations.
Comment 1 James A. Morrison 2004-10-01 01:48:33 UTC
Created attachment 7249 [details]
Make treelang work with --enable-mapped-location
Comment 2 Andrew Pinski 2004-10-01 03:24:56 UTC
Patch posted here: <http://gcc.gnu.org/ml/gcc-patches/2004-10/msg00012.html>.
Confirmed.
Comment 3 GCC Commits 2004-10-02 18:38:34 UTC
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

Comment 4 James A. Morrison 2004-10-02 18:46:35 UTC
 Treelang now works with --enable-mapped-location.