[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
FYI: merge branch-2.6 into maint and then maint into master
From: |
Akim Demaille |
Subject: |
FYI: merge branch-2.6 into maint and then maint into master |
Date: |
Thu, 8 Nov 2012 09:36:26 +0100 |
First merge:
commit 3ada39389411fa8a7739b3c855c88516463de594
Merge: 0490162 9d2423f
Author: Akim Demaille <address@hidden>
Date: Thu Nov 8 09:20:48 2012 +0100
Merge branch 'branch-2.6' into maint
* origin/branch-2.6:
maint: post-release administrivia
version 2.6.5
regen
tests: syntax-check
tests: beware of compilers that do not support POSIXLY_CORRECT
gnulib: update
Conflicts:
NEWS
src/parse-gram.c
src/parse-gram.h
diff --git a/.prev-version b/.prev-version
index 2714f53..57cf282 100644
--- a/.prev-version
+++ b/.prev-version
@@ -1 +1 @@
-2.6.4
+2.6.5
diff --git a/NEWS b/NEWS
index b7a1a72..bb016bb 100644
--- a/NEWS
+++ b/NEWS
@@ -51,7 +51,7 @@ GNU Bison NEWS
The reductions are now explicitly represented as transitions to other
diamond shaped nodes.
-* Noteworthy changes in release ?.? (????-??-??) [?]
+* Noteworthy changes in release 2.6.5 (2012-11-07) [stable]
We consider compiler warnings about Bison generated parsers to be bugs.
Rather than working around them in your own project, please consider
diff --git a/configure.ac b/configure.ac
index 955f56e..83e20ac 100644
--- a/configure.ac
+++ b/configure.ac
@@ -114,6 +114,7 @@ fi
BISON_TEST_FOR_WORKING_C_COMPILER
BISON_TEST_FOR_WORKING_CXX_COMPILER
+BISON_C_COMPILER_POSIXLY_CORRECT
AC_ARG_ENABLE([yacc],
[AC_HELP_STRING([--disable-yacc],
diff --git a/m4/c-working.m4 b/m4/c-working.m4
index d563d32..0db60f7 100644
--- a/m4/c-working.m4
+++ b/m4/c-working.m4
@@ -25,3 +25,47 @@ AC_DEFUN([BISON_TEST_FOR_WORKING_C_COMPILER], [
[],
[AC_MSG_FAILURE([cannot compile a simple C program])])
])
+
+# BISON_CHECK_WITH_POSIXLY_CORRECT(CODE)
+# --------------------------------------
+# Run the Autoconf CODE with POSIXLY_CORRECT set to 1, and restored to
+# its initial value afterwards.
+AC_DEFUN([BISON_CHECK_WITH_POSIXLY_CORRECT],
+[gl_awk_probe='BEGIN { if ("POSIXLY_CORRECT" in ENVIRON) print "x" }'
+case ${POSIXLY_CORRECT+x}`$AWK "$gl_awk_probe" </dev/null` in
+ xx) gl_had_POSIXLY_CORRECT=exported ;;
+ x) gl_had_POSIXLY_CORRECT=yes ;;
+ *) gl_had_POSIXLY_CORRECT= ;;
+esac
+POSIXLY_CORRECT=1
+export POSIXLY_CORRECT
+$1
+case $gl_had_POSIXLY_CORRECT in
+ exported) ;;
+ yes) AS_UNSET([POSIXLY_CORRECT]); POSIXLY_CORRECT=1 ;;
+ *) AS_UNSET([POSIXLY_CORRECT]) ;;
+esac
+])
+
+# BISON_C_COMPILER_POSIXLY_CORRECT
+# --------------------------------
+# Whether the compiler supports -g in POSIXLY_CORRECT mode. clang-2.9
+# on OS X does not, because "clang-mp-2.9 -o test -g test.c" launches
+# "/usr/bin/dsymutil test -o test.dSYM" which fails with "error:
+# unable to open executable '-o'".
+#
+# Sets C_COMPILER_POSIXLY_CORRECT to true/false.
+AC_DEFUN([BISON_C_COMPILER_POSIXLY_CORRECT],
+[AC_CACHE_CHECK([whether $CC supports POSIXLY_CORRECT=1],
+ [bison_cv_cc_supports_posixly_correct],
+[BISON_CHECK_WITH_POSIXLY_CORRECT(
+[AC_LANG_PUSH([C])
+AC_LINK_IFELSE([AC_LANG_PROGRAM],
+ [bison_cv_cc_supports_posixly_correct=yes],
+ [bison_cv_cc_supports_posixly_correct=no])
+AC_LANG_POP([C])])])
+case $bison_cv_cc_supports_posixly_correct in
+ yes) AC_SUBST([C_COMPILER_POSIXLY_CORRECT], [true]) ;;
+ no) AC_SUBST([C_COMPILER_POSIXLY_CORRECT], [false]);;
+esac
+])
diff --git a/tests/actions.at b/tests/actions.at
index 01e3e57..ec88cb9 100644
--- a/tests/actions.at
+++ b/tests/actions.at
@@ -75,7 +75,7 @@ AT_CLEANUP
# AT_TEST(SKELETON-NAME, DIRECTIVES)
# ----------------------------------
-# Check the the initial location is correct.
+# Check that the initial location is correct.
m4_pushdef([AT_TEST],
[AT_SETUP([Initial location: $1 $2])
diff --git a/tests/atlocal.in b/tests/atlocal.in
index 2f68259..5e3cb72 100644
--- a/tests/atlocal.in
+++ b/tests/atlocal.in
@@ -79,3 +79,13 @@ LIBS="$abs_top_builddir/lib/libbison.a @LIBS@ @INTLLIBS@"
: ${XSLTPROC='@XSLTPROC@'}
: ${PERL='@PERL@'}
+
+# Don't just check if $POSIXLY_CORRECT is set, as Bash, when launched
+# as /bin/sh, sets the shell variable POSIXLY_CORRECT to y, but not
+# the environment variable.
+: ${C_COMPILER_POSIXLY_CORRECT='@C_COMPILER_POSIXLY_CORRECT@'}
+if env | grep '^POSIXLY_CORRECT=' >/dev/null; then
+ POSIXLY_CORRECT_IS_EXPORTED=true
+else
+ POSIXLY_CORRECT_IS_EXPORTED=false
+fi
diff --git a/tests/local.at b/tests/local.at
index e2fd1be..88e797f 100644
--- a/tests/local.at
+++ b/tests/local.at
@@ -468,11 +468,7 @@ m4_define([AT_BISON_CHECK_WARNINGS_],
[[# Defining POSIXLY_CORRECT causes bison to complain if options are
# added after the grammar file name, so skip these checks in that
# case.
-#
-# Don't just check if $POSIXLY_CORRECT is set, as Bash, when launched
-# as /bin/sh, sets the shell variable POSIXLY_CORRECT to y, but not
-# the environment variable.
-if env | grep '^POSIXLY_CORRECT=' >/dev/null; then :; else
+if test "$POSIXLY_CORRECT_IS_EXPORTED" = false; then
]AT_SAVE_SPECIAL_FILES[
# To avoid expanding it repeatedly, store specified stdout.
@@ -597,7 +593,10 @@ m4_define([AT_QUELL_VALGRIND],
# otherwise pass "-c"; this is a hack. The default SOURCES is OUTPUT
# with trailing .o removed, and ".c" appended.
m4_define([AT_COMPILE],
-[AT_CHECK(m4_join([ ],
+[AT_CHECK([case $POSIXLY_CORRECT_IS_EXPORTED:$C_COMPILER_POSIXLY_CORRECT in
+ true:false) echo 'cannot compile properly with POSIXLY_CORRECT' && exit 77;;
+esac])
+AT_CHECK(m4_join([ ],
[$CC $CFLAGS $CPPFLAGS],
[m4_bmatch([$1], [[.]], [-c], [$LDFLAGS])],
[-o $1],
Second one:
commit e431adc18396f097e2c60d4287fb88d1d5a5ba08
Merge: e42906f 429436a
Author: Akim Demaille <address@hidden>
Date: Thu Nov 8 09:24:51 2012 +0100
Merge branch 'maint'
* origin/maint:
regen
maint: post-release administrivia
version 2.6.5
regen
tests: syntax-check
tests: beware of compilers that do not support POSIXLY_CORRECT
gnulib: update
Conflicts:
src/parse-gram.c
src/parse-gram.h
tests/atlocal.in
diff --git a/.prev-version b/.prev-version
index 2714f53..57cf282 100644
--- a/.prev-version
+++ b/.prev-version
@@ -1 +1 @@
-2.6.4
+2.6.5
diff --git a/NEWS b/NEWS
index c067ac0..cb59471 100644
--- a/NEWS
+++ b/NEWS
@@ -291,7 +291,7 @@ GNU Bison NEWS
The reductions are now explicitly represented as transitions to other
diamond shaped nodes.
-* Noteworthy changes in release ?.? (????-??-??) [?]
+* Noteworthy changes in release 2.6.5 (2012-11-07) [stable]
We consider compiler warnings about Bison generated parsers to be bugs.
Rather than working around them in your own project, please consider
diff --git a/configure.ac b/configure.ac
index 8a297ff..aec681a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -117,6 +117,7 @@ fi
BISON_TEST_FOR_WORKING_C_COMPILER
BISON_TEST_FOR_WORKING_CXX_COMPILER
+BISON_C_COMPILER_POSIXLY_CORRECT
AC_ARG_ENABLE([yacc],
[AC_HELP_STRING([--disable-yacc],
diff --git a/gnulib b/gnulib
--- a/gnulib
+++ b/gnulib
@@ -1 +1 @@
-Subproject commit daf7f8c02242c535d596231e2f655109b97fa2bc
+Subproject commit daf7f8c02242c535d596231e2f655109b97fa2bc-dirty
diff --git a/m4/c-working.m4 b/m4/c-working.m4
index fbc6da4..ee84acf 100644
--- a/m4/c-working.m4
+++ b/m4/c-working.m4
@@ -25,3 +25,47 @@ AC_DEFUN([BISON_TEST_FOR_WORKING_C_COMPILER], [
[],
[AC_MSG_FAILURE([cannot compile a simple C program])])
])
+
+# BISON_CHECK_WITH_POSIXLY_CORRECT(CODE)
+# --------------------------------------
+# Run the Autoconf CODE with POSIXLY_CORRECT set to 1, and restored to
+# its initial value afterwards.
+AC_DEFUN([BISON_CHECK_WITH_POSIXLY_CORRECT],
+[gl_awk_probe='BEGIN { if ("POSIXLY_CORRECT" in ENVIRON) print "x" }'
+case ${POSIXLY_CORRECT+x}`$AWK "$gl_awk_probe" </dev/null` in
+ xx) gl_had_POSIXLY_CORRECT=exported ;;
+ x) gl_had_POSIXLY_CORRECT=yes ;;
+ *) gl_had_POSIXLY_CORRECT= ;;
+esac
+POSIXLY_CORRECT=1
+export POSIXLY_CORRECT
+$1
+case $gl_had_POSIXLY_CORRECT in
+ exported) ;;
+ yes) AS_UNSET([POSIXLY_CORRECT]); POSIXLY_CORRECT=1 ;;
+ *) AS_UNSET([POSIXLY_CORRECT]) ;;
+esac
+])
+
+# BISON_C_COMPILER_POSIXLY_CORRECT
+# --------------------------------
+# Whether the compiler supports -g in POSIXLY_CORRECT mode. clang-2.9
+# on OS X does not, because "clang-mp-2.9 -o test -g test.c" launches
+# "/usr/bin/dsymutil test -o test.dSYM" which fails with "error:
+# unable to open executable '-o'".
+#
+# Sets C_COMPILER_POSIXLY_CORRECT to true/false.
+AC_DEFUN([BISON_C_COMPILER_POSIXLY_CORRECT],
+[AC_CACHE_CHECK([whether $CC supports POSIXLY_CORRECT=1],
+ [bison_cv_cc_supports_posixly_correct],
+[BISON_CHECK_WITH_POSIXLY_CORRECT(
+[AC_LANG_PUSH([C])
+AC_LINK_IFELSE([AC_LANG_PROGRAM],
+ [bison_cv_cc_supports_posixly_correct=yes],
+ [bison_cv_cc_supports_posixly_correct=no])
+AC_LANG_POP([C])])])
+case $bison_cv_cc_supports_posixly_correct in
+ yes) AC_SUBST([C_COMPILER_POSIXLY_CORRECT], [true]) ;;
+ no) AC_SUBST([C_COMPILER_POSIXLY_CORRECT], [false]);;
+esac
+])
diff --git a/tests/actions.at b/tests/actions.at
index 7b220a2..01fecc6 100644
--- a/tests/actions.at
+++ b/tests/actions.at
@@ -75,7 +75,7 @@ AT_CLEANUP
# AT_TEST(SKELETON-NAME, DIRECTIVES)
# ----------------------------------
-# Check the the initial location is correct.
+# Check that the initial location is correct.
m4_pushdef([AT_TEST],
[AT_SETUP([Initial location: $1 $2])
diff --git a/tests/atlocal.in b/tests/atlocal.in
index e350d13..16e6fda 100644
--- a/tests/atlocal.in
+++ b/tests/atlocal.in
@@ -79,6 +79,15 @@ LIBS="$abs_top_builddir/lib/libbison.a @LIBS@ @INTLLIBS@"
# Empty if no xsltproc was found
: ${XSLTPROC='@XSLTPROC@'}
+# Don't just check if $POSIXLY_CORRECT is set, as Bash, when launched
+# as /bin/sh, sets the shell variable POSIXLY_CORRECT to y, but not
+# the environment variable.
+: ${C_COMPILER_POSIXLY_CORRECT='@C_COMPILER_POSIXLY_CORRECT@'}
+if env | grep '^POSIXLY_CORRECT=' >/dev/null; then
+ POSIXLY_CORRECT_IS_EXPORTED=true
+else
+ POSIXLY_CORRECT_IS_EXPORTED=false
+fi
# Handle --compile-c-with-cxx here, once CXX and CXXFLAGS are known.
if "$at_arg_compile_c_with_cxx"; then
diff --git a/tests/local.at b/tests/local.at
index d120712..fb74faf 100644
--- a/tests/local.at
+++ b/tests/local.at
@@ -472,11 +472,7 @@ m4_define([AT_BISON_CHECK_WARNINGS_],
[[# Defining POSIXLY_CORRECT causes bison to complain if options are
# added after the grammar file name, so skip these checks in that
# case.
-#
-# Don't just check if $POSIXLY_CORRECT is set, as Bash, when launched
-# as /bin/sh, sets the shell variable POSIXLY_CORRECT to y, but not
-# the environment variable.
-if env | grep '^POSIXLY_CORRECT=' >/dev/null; then :; else
+if test "$POSIXLY_CORRECT_IS_EXPORTED" = false; then
]AT_SAVE_SPECIAL_FILES[
# To avoid expanding it repeatedly, store specified stdout.
@@ -578,7 +574,10 @@ m4_define([AT_QUELL_VALGRIND],
# otherwise pass "-c"; this is a hack. The default SOURCES is OUTPUT
# with trailing .o removed, and ".c" appended.
m4_define([AT_COMPILE],
-[AT_CHECK(m4_join([ ],
+[AT_CHECK([case $POSIXLY_CORRECT_IS_EXPORTED:$C_COMPILER_POSIXLY_CORRECT in
+ true:false) echo 'cannot compile properly with POSIXLY_CORRECT' && exit 77;;
+esac])
+AT_CHECK(m4_join([ ],
[$CC $CFLAGS $CPPFLAGS],
[m4_bmatch([$1], [[.]], [-c], [$LDFLAGS])],
[-o $1],
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- FYI: merge branch-2.6 into maint and then maint into master,
Akim Demaille <=