Convert "misleading reference" messages to warnings.

* src/scan-code.l: New function 'show_sub_messages', more
	factoring.
	* tests/named-ref.at: Adjust tests.
This commit is contained in:
Alex Rozenman
2009-08-08 18:10:23 +03:00
parent 401b73afdf
commit ce268795cc
3 changed files with 129 additions and 100 deletions

View File

@@ -256,10 +256,10 @@ exp:
AT_BISON_CHECK([-o test.c test.y], 1, [],
[[test.y:50.51-60: invalid reference: `$<ival>lo9', symbol not found
test.y:51.51-60: misleading reference: `$<ival>exp'
test.y:42.1-3: refers to: $exp at $$
test.y:51.7: possibly meant: $x, hiding $exp at $1
test.y:51.41: possibly meant: $r, hiding $exp at $4
test.y:51.51-60: warning: misleading reference: `$<ival>exp'
test.y:42.1-3: warning: refers to: $exp at $$
test.y:51.7: warning: possibly meant: $x, hiding $exp at $1
test.y:51.41: warning: possibly meant: $r, hiding $exp at $4
test.y:52.51-52: $l of `exp' has no declared type
test.y:55.46-49: invalid reference: `$r12', symbol not found
test.y:56.29-33: invalid reference: `$expo', symbol not found
@@ -276,10 +276,10 @@ start: foo foo.bar { $foo.bar; }
foo: '1'
foo.bar: '2'
]])
AT_BISON_CHECK([-o test.c test.y], 1, [],
[[test.y:11.22-29: misleading reference: `$foo.bar'
test.y:11.8-10: refers to: $foo at $1
test.y:11.12-18: possibly meant: $[foo.bar] at $2
AT_BISON_CHECK([-o test.c test.y], 0, [],
[[test.y:11.22-29: warning: misleading reference: `$foo.bar'
test.y:11.8-10: warning: refers to: $foo at $1
test.y:11.12-18: warning: possibly meant: $[foo.bar] at $2
]])
AT_CLEANUP