[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 3/3] carets: document default activation
From: |
Theophile Ranquet |
Subject: |
[PATCH 3/3] carets: document default activation |
Date: |
Fri, 11 Jan 2013 13:59:44 +0100 |
* NEWS: Announce it.
* doc/bison.texi: Adjust.
---
NEWS | 6 ++++++
doc/bison.texi | 16 +++++++++++++++-
2 files changed, 21 insertions(+), 1 deletion(-)
diff --git a/NEWS b/NEWS
index a44e1be..7258de6 100644
--- a/NEWS
+++ b/NEWS
@@ -16,6 +16,12 @@ GNU Bison NEWS
** Warnings
+*** Carets
+
+ Version 2.7 introduced caret errors, for a prettier output. These are now
+ activated by default. The old format can still be used by invoking Bison
+ with -fno-caret (or -fnone).
+
*** Enhancements of the -Werror option
The -Werror=CATEGORY option is now recognized, and will treat specified
diff --git a/doc/bison.texi b/doc/bison.texi
index 9708ad4..c06a7ff 100644
--- a/doc/bison.texi
+++ b/doc/bison.texi
@@ -9774,7 +9774,7 @@ an example, using the following file @file{in.y}:
exp: exp '+' exp @{ $exp = $1 + $2; @};
@end example
-When invoked with @option{-fcaret}, Bison will report:
+When invoked with @option{-fcaret} (or nothing), Bison will report:
@example
@group
@@ -9804,6 +9804,20 @@ in.y:3.32-33: error: $2 of 'exp' has no declared type
@end group
@end example
+Whereas, when invoked with @option{-fno-caret}, Bison will only report:
+
address@hidden
address@hidden
+in.y:3.20-23: error: ambiguous reference: ‘$exp’
+in.y:3.1-3: refers to: $exp at $$
+in.y:3.6-8: refers to: $exp at $1
+in.y:3.14-16: refers to: $exp at $3
+in.y:3.32-33: error: $2 of ‘exp’ has no declared type
address@hidden group
address@hidden example
+
+This option is activated by default.
+
@end table
@end table
--
1.8.1