[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Warning about missing semicolon at end of action
From: |
Joel E. Denny |
Subject: |
Re: [PATCH] Warning about missing semicolon at end of action |
Date: |
Sat, 4 Apr 2009 02:19:46 -0400 (EDT) |
On Sat, 22 Nov 2008, Di-an JAN wrote:
> +2008-11-22 Di-an Jan <address@hidden>
> +
> + Implement the FIXME that ends an user action with a semicolon
> + if it seems necessary.
Do we still want this in 2.5? If so, I'll push a branch-2.5 that
cherry-picks Di-an's patch from master and then adds the following patch.
>From 2604d459092337cf1369dfaeb09f98c27d0089b3 Mon Sep 17 00:00:00 2001
From: Joel E. Denny <address@hidden>
Date: Sat, 4 Apr 2009 02:10:33 -0400
Subject: [PATCH] Document semicolon warnings.
* NEWS (2.5): In this new section.
* tests/actions.at: Update copyright for previous patch.
* tests/input.at: Likewise.
diff --git a/ChangeLog b/ChangeLog
index f3b2eb5..62356e1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2009-04-04 Joel E. Denny <address@hidden>
+
+ Document semicolon warnings.
+ * NEWS (2.5): In this new section.
+ * tests/actions.at: Update copyright for previous patch.
+ * tests/input.at: Likewise.
+
2008-12-07 Di-an Jan <address@hidden>
Implement the FIXME that ends an user action with a semicolon
@@ -21217,8 +21224,8 @@
-----
Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996,
- 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
- Free Software Foundation, Inc.
+ 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
+ 2008, 2009 Free Software Foundation, Inc.
Copying and distribution of this file, with or without
modification, are permitted provided the copyright notice and this
diff --git a/NEWS b/NEWS
index 69c6d3b..d991fbb 100644
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,29 @@
Bison News
----------
+* Changes in version 2.5 (????-??-??):
+
+** Temporary hack for adding a semicolon to the user action.
+
+ Previously, Bison appended a semicolon to every user action for
+ reductions when the output language defaulted to C (specifically, when
+ neither %yacc, %language, %skeleton, or equivalent command-line
+ options were specified). This allowed actions such as
+
+ exp: exp "+" exp { $$ = $1 + $3 };
+
+ instead of
+
+ exp: exp "+" exp { $$ = $1 + $3; };
+
+ As a first step in removing this misfeature, Bison now issues a
+ warning when it appends a semicolon. Moreover, in cases where Bison
+ cannot easily determine whether a semicolon is needed (for example, an
+ action ending with a cpp directive or a braced compound initializer),
+ it no longer appends one. Thus, the C compiler might now complain
+ about a missing semicolon where it did not before. Future releases of
+ Bison will cease to append semicolons entirely.
+
* Changes in version 2.4.2 (????-??-??):
* Changes in version 2.4.1 (2008-12-11):
diff --git a/tests/actions.at b/tests/actions.at
index 3cf0956..cc59959 100644
--- a/tests/actions.at
+++ b/tests/actions.at
@@ -1,6 +1,6 @@
# Executing Actions. -*- Autotest -*-
-# Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software
-# Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free
+# Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/tests/input.at b/tests/input.at
index 7da3581..0df88fe 100644
--- a/tests/input.at
+++ b/tests/input.at
@@ -1,6 +1,6 @@
# Checking the Bison scanner. -*- Autotest -*-
-# Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation,
-# Inc.
+# Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software
+# Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
--
1.5.4.3
- Re: [PATCH] Warning about missing semicolon at end of action,
Joel E. Denny <=