mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-10 12:53:03 +00:00
Merge remote-tracking branch 'origin/maint'
* origin/maint: glr.cc: fix a clang warning maint: update copyright years build: fix VPATH issue build: avoid clang's colored diagnostics in the test suite tests: please clang and use ".cc", not ".c", for C++ input gnulib: update skeletons: avoid empty switch constructs lalr1.cc: fix compiler warnings yacc.c: do not use __attribute__ unprotected tests: style changes
This commit is contained in:
@@ -78,11 +78,11 @@ dist-hook: gen-ChangeLog
|
|||||||
|
|
||||||
.PHONY: update-b4-copyright update-package-copyright-year
|
.PHONY: update-b4-copyright update-package-copyright-year
|
||||||
update-b4-copyright:
|
update-b4-copyright:
|
||||||
find $(srcdir)/data -type f \
|
$(AM_V_GEN)find $(srcdir)/data -type f \
|
||||||
| xargs $(srcdir)/build-aux/$@
|
| xargs $(srcdir)/build-aux/$@
|
||||||
@echo 'warning: src/parse-gram.[hc] may need to be regenerated.'
|
@echo 'warning: src/parse-gram.[hc] may need to be regenerated.'
|
||||||
update-package-copyright-year:
|
update-package-copyright-year:
|
||||||
$(srcdir)/build-aux/$@ $(srcdir)/configure.ac
|
$(AM_V_GEN)$(srcdir)/build-aux/$@ $(srcdir)/configure.ac
|
||||||
|
|
||||||
gen_start_date = 2012-01-16
|
gen_start_date = 2012-01-16
|
||||||
.PHONY: gen-ChangeLog
|
.PHONY: gen-ChangeLog
|
||||||
|
|||||||
10
NEWS
10
NEWS
@@ -569,6 +569,16 @@ GNU Bison NEWS
|
|||||||
...
|
...
|
||||||
}
|
}
|
||||||
|
|
||||||
|
* Noteworthy changes in release ?.? (????-??-??) [?]
|
||||||
|
|
||||||
|
** Bug fixes
|
||||||
|
|
||||||
|
*** Fix compiler attribute portability (yacc.c)
|
||||||
|
|
||||||
|
With locations enabled, __attribute__ was used unprotected.
|
||||||
|
|
||||||
|
*** Fix some compiler warnings (lalr1.cc)
|
||||||
|
|
||||||
* Noteworthy changes in release 2.7 (2012-12-12) [stable]
|
* Noteworthy changes in release 2.7 (2012-12-12) [stable]
|
||||||
|
|
||||||
** Bug fixes
|
** Bug fixes
|
||||||
|
|||||||
2
THANKS
2
THANKS
@@ -107,6 +107,7 @@ Ralf Wildenhues Ralf.Wildenhues@gmx.de
|
|||||||
Richard Stallman rms@gnu.org
|
Richard Stallman rms@gnu.org
|
||||||
Rob Vermaas rob.vermaas@gmail.com
|
Rob Vermaas rob.vermaas@gmail.com
|
||||||
Robert Anisko anisko_r@epita.fr
|
Robert Anisko anisko_r@epita.fr
|
||||||
|
Rob Conde rob.conde@ai-solutions.com
|
||||||
Roland Levillain roland@lrde.epita.fr
|
Roland Levillain roland@lrde.epita.fr
|
||||||
Satya Kiran Popuri satyakiran@gmail.com
|
Satya Kiran Popuri satyakiran@gmail.com
|
||||||
Sebastian Setzer sebastian.setzer.ext@siemens.com
|
Sebastian Setzer sebastian.setzer.ext@siemens.com
|
||||||
@@ -127,6 +128,7 @@ Tommy Nordgren tommy.nordgren@chello.se
|
|||||||
Troy A. Johnson troyj@ecn.purdue.edu
|
Troy A. Johnson troyj@ecn.purdue.edu
|
||||||
Tys Lefering gccbison@gmail.com
|
Tys Lefering gccbison@gmail.com
|
||||||
Valentin Tolmer nitnelave1@gmail.com
|
Valentin Tolmer nitnelave1@gmail.com
|
||||||
|
Victor Khomenko victor.khomenko@newcastle.ac.uk
|
||||||
Vin Shelton acs@alumni.princeton.edu
|
Vin Shelton acs@alumni.princeton.edu
|
||||||
W.C.A. Wijngaards wouter@NLnetLabs.nl
|
W.C.A. Wijngaards wouter@NLnetLabs.nl
|
||||||
Wayne Green wayne@infosavvy.com
|
Wayne Green wayne@infosavvy.com
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
# Print a version string.
|
# Print a version string.
|
||||||
scriptversion=2013-01-20.16; # UTC
|
scriptversion=2013-03-08.16; # UTC
|
||||||
|
|
||||||
# Bootstrap this package from checked-out sources.
|
# Bootstrap this package from checked-out sources.
|
||||||
|
|
||||||
@@ -630,9 +630,13 @@ esac
|
|||||||
if $bootstrap_sync; then
|
if $bootstrap_sync; then
|
||||||
cmp -s "$0" "$GNULIB_SRCDIR/build-aux/bootstrap" || {
|
cmp -s "$0" "$GNULIB_SRCDIR/build-aux/bootstrap" || {
|
||||||
echo "$0: updating bootstrap and restarting..."
|
echo "$0: updating bootstrap and restarting..."
|
||||||
|
case $(sh -c 'echo "$1"' -- a) in
|
||||||
|
a) ignored=--;;
|
||||||
|
*) ignored=ignored;;
|
||||||
|
esac
|
||||||
exec sh -c \
|
exec sh -c \
|
||||||
'cp "$1" "$2" && shift && exec "${CONFIG_SHELL-/bin/sh}" "$@"' \
|
'cp "$1" "$2" && shift && exec "${CONFIG_SHELL-/bin/sh}" "$@"' \
|
||||||
-- "$GNULIB_SRCDIR/build-aux/bootstrap" \
|
$ignored "$GNULIB_SRCDIR/build-aux/bootstrap" \
|
||||||
"$0" "$@" --no-bootstrap-sync
|
"$0" "$@" --no-bootstrap-sync
|
||||||
}
|
}
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
## Makefile for Bison testsuite.
|
|
||||||
|
|
||||||
# Copyright (C) 2000-2013 Free Software Foundation, Inc.
|
# Copyright (C) 2000-2013 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
|
|||||||
@@ -461,6 +461,24 @@ m4_define([b4_symbol_destructor], [b4_symbol_action([$1], [destructor])])
|
|||||||
m4_define([b4_symbol_printer], [b4_symbol_action([$1], [printer])])
|
m4_define([b4_symbol_printer], [b4_symbol_action([$1], [printer])])
|
||||||
|
|
||||||
|
|
||||||
|
# b4_symbol_actions(KIND, [TYPE = yytype])
|
||||||
|
# ----------------------------------------
|
||||||
|
# Emit the symbol actions for KIND ("printer" or "destructor").
|
||||||
|
# Dispatch on TYPE.
|
||||||
|
m4_define([b4_symbol_actions],
|
||||||
|
[m4_pushdef([b4_actions_], m4_expand([b4_symbol_foreach([b4_symbol_$1])]))dnl
|
||||||
|
m4_ifval(m4_defn([b4_actions_]),
|
||||||
|
[switch (m4_default([$2], [yytype]))
|
||||||
|
{
|
||||||
|
m4_defn([b4_actions_])
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}dnl
|
||||||
|
],
|
||||||
|
[YYUSE (m4_default([$2], [yytype]));])dnl
|
||||||
|
m4_popdef([b4_actions_])dnl
|
||||||
|
])
|
||||||
|
|
||||||
# b4_symbol_case_(SYMBOL-NUM)
|
# b4_symbol_case_(SYMBOL-NUM)
|
||||||
# ---------------------------
|
# ---------------------------
|
||||||
# Issue a "case NUM" for SYMBOL-NUM.
|
# Issue a "case NUM" for SYMBOL-NUM.
|
||||||
|
|||||||
39
data/c.m4
39
data/c.m4
@@ -199,6 +199,31 @@ m4_define([b4_table_value_equals],
|
|||||||
[(!!(($2) == ($3)))])])
|
[(!!(($2) == ($3)))])])
|
||||||
|
|
||||||
|
|
||||||
|
## ----------------- ##
|
||||||
|
## Compiler issues. ##
|
||||||
|
## ----------------- ##
|
||||||
|
|
||||||
|
# b4_attribute_define
|
||||||
|
# -------------------
|
||||||
|
# Provide portability for __attribute__.
|
||||||
|
m4_define([b4_attribute_define],
|
||||||
|
[#ifndef __attribute__
|
||||||
|
/* This feature is available in gcc versions 2.5 and later. */
|
||||||
|
# if (! defined __GNUC__ || __GNUC__ < 2 \
|
||||||
|
|| (__GNUC__ == 2 && __GNUC_MINOR__ < 5))
|
||||||
|
# define __attribute__(Spec) /* empty */
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Suppress unused-variable warnings by "using" E. */
|
||||||
|
#if ! defined lint || defined __GNUC__
|
||||||
|
# define YYUSE(E) ((void) (E))
|
||||||
|
#else
|
||||||
|
# define YYUSE(E) /* empty */
|
||||||
|
#endif
|
||||||
|
])
|
||||||
|
|
||||||
|
|
||||||
## ---------##
|
## ---------##
|
||||||
## Values. ##
|
## Values. ##
|
||||||
## ---------##
|
## ---------##
|
||||||
@@ -421,12 +446,7 @@ m4_ifset([b4_parse_param], [, b4_parse_param]))[
|
|||||||
yymsg = "Deleting";
|
yymsg = "Deleting";
|
||||||
YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
|
YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
|
||||||
|
|
||||||
switch (yytype)
|
]b4_symbol_actions([destructor])[
|
||||||
{
|
|
||||||
]b4_symbol_foreach([b4_symbol_destructor])dnl
|
|
||||||
[ default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}]dnl
|
}]dnl
|
||||||
])
|
])
|
||||||
|
|
||||||
@@ -459,12 +479,7 @@ m4_if(b4_skeleton, ["yacc.c"],
|
|||||||
YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
|
YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
|
||||||
# endif
|
# endif
|
||||||
]])dnl
|
]])dnl
|
||||||
[ switch (yytype)
|
b4_symbol_actions([printer])[
|
||||||
{
|
|
||||||
]b4_symbol_foreach([b4_symbol_printer])dnl
|
|
||||||
[ default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
19
data/glr.c
19
data/glr.c
@@ -246,13 +246,6 @@ b4_percent_code_get[]dnl
|
|||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Suppress unused-variable warnings by "using" E. */
|
|
||||||
#ifdef __GNUC__
|
|
||||||
# define YYUSE(E) ((void) (E))
|
|
||||||
#else
|
|
||||||
# define YYUSE(E) /* empty */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef YYFREE
|
#ifndef YYFREE
|
||||||
# define YYFREE free
|
# define YYFREE free
|
||||||
#endif
|
#endif
|
||||||
@@ -281,17 +274,7 @@ b4_percent_code_get[]dnl
|
|||||||
# define YYLONGJMP(Env, Val) (longjmp (Env, Val), YYASSERT (0))
|
# define YYLONGJMP(Env, Val) (longjmp (Env, Val), YYASSERT (0))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*-----------------.
|
]b4_attribute_define[
|
||||||
| GCC extensions. |
|
|
||||||
`-----------------*/
|
|
||||||
|
|
||||||
#ifndef __attribute__
|
|
||||||
/* This feature is available in gcc versions 2.5 and later. */
|
|
||||||
# if (! defined __GNUC__ || __GNUC__ < 2 \
|
|
||||||
|| (__GNUC__ == 2 && __GNUC_MINOR__ < 5))
|
|
||||||
# define __attribute__(Spec) /* empty */
|
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef YYASSERT
|
#ifndef YYASSERT
|
||||||
# define YYASSERT(Condition) ((void) ((Condition) || (abort (), 0)))
|
# define YYASSERT(Condition) ((void) ((Condition) || (abort (), 0)))
|
||||||
|
|||||||
@@ -187,12 +187,7 @@ m4_pushdef([b4_parse_param], m4_defn([b4_parse_param_orig]))dnl
|
|||||||
std::ostream& yyoutput = debug_stream ();
|
std::ostream& yyoutput = debug_stream ();
|
||||||
std::ostream& yyo = yyoutput;
|
std::ostream& yyo = yyoutput;
|
||||||
YYUSE (yyo);
|
YYUSE (yyo);
|
||||||
switch (yytype)
|
]b4_symbol_actions([printer])[
|
||||||
{
|
|
||||||
]b4_symbol_foreach([b4_symbol_printer])dnl
|
|
||||||
[ default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -40,7 +40,6 @@ m4_define([b4_integral_parser_table_define],
|
|||||||
};dnl
|
};dnl
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
# b4_symbol_value_template(VAL, [TYPE])
|
# b4_symbol_value_template(VAL, [TYPE])
|
||||||
# -------------------------------------
|
# -------------------------------------
|
||||||
# Same as b4_symbol_value, but used in a template method. It makes
|
# Same as b4_symbol_value, but used in a template method. It makes
|
||||||
@@ -205,6 +204,10 @@ b4_location_define])])[
|
|||||||
void error (const syntax_error& err);
|
void error (const syntax_error& err);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
/// This class is not copyable.
|
||||||
|
]b4_parser_class_name[ (const ]b4_parser_class_name[&);
|
||||||
|
]b4_parser_class_name[& operator= (const ]b4_parser_class_name[&);
|
||||||
|
|
||||||
/// State numbers.
|
/// State numbers.
|
||||||
typedef int state_type;
|
typedef int state_type;
|
||||||
|
|
||||||
@@ -595,13 +598,7 @@ m4_if(b4_prefix, [yy], [],
|
|||||||
YY_SYMBOL_PRINT (yymsg, yysym);]b4_variant_if([], [
|
YY_SYMBOL_PRINT (yymsg, yysym);]b4_variant_if([], [
|
||||||
|
|
||||||
// User destructor.
|
// User destructor.
|
||||||
symbol_number_type yytype = yysym.type_get ();
|
b4_symbol_actions([destructor], [yysym.type_get ()])])[
|
||||||
switch (yytype)
|
|
||||||
{
|
|
||||||
]b4_symbol_foreach([b4_symbol_destructor])dnl
|
|
||||||
[ default:
|
|
||||||
break;
|
|
||||||
}])[
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#if ]b4_api_PREFIX[DEBUG
|
#if ]b4_api_PREFIX[DEBUG
|
||||||
@@ -616,12 +613,7 @@ m4_if(b4_prefix, [yy], [],
|
|||||||
yyo << (yytype < yyntokens_ ? "token" : "nterm")
|
yyo << (yytype < yyntokens_ ? "token" : "nterm")
|
||||||
<< ' ' << yytname_[yytype] << " ("]b4_locations_if([
|
<< ' ' << yytname_[yytype] << " ("]b4_locations_if([
|
||||||
<< yysym.location << ": "])[;
|
<< yysym.location << ": "])[;
|
||||||
switch (yytype)
|
]b4_symbol_actions([printer])[
|
||||||
{
|
|
||||||
]b4_symbol_foreach([b4_symbol_printer])dnl
|
|
||||||
[ default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
yyo << ')';
|
yyo << ')';
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -741,7 +733,7 @@ b4_dollar_popdef])[]dnl
|
|||||||
yynewstate, since the latter expects the semantical and the
|
yynewstate, since the latter expects the semantical and the
|
||||||
location values to have been already stored, initialize these
|
location values to have been already stored, initialize these
|
||||||
stacks with a primary value. */
|
stacks with a primary value. */
|
||||||
yystack_ = stack_type (0);
|
yystack_.clear ();
|
||||||
yypush_ (YY_NULL, 0, yyla);
|
yypush_ (YY_NULL, 0, yyla);
|
||||||
|
|
||||||
// A new symbol was pushed on the stack.
|
// A new symbol was pushed on the stack.
|
||||||
|
|||||||
@@ -72,6 +72,12 @@ m4_define([b4_stack_define],
|
|||||||
seq_.pop_back ();
|
seq_.pop_back ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
clear ()
|
||||||
|
{
|
||||||
|
seq_.clear ();
|
||||||
|
}
|
||||||
|
|
||||||
inline
|
inline
|
||||||
typename S::size_type
|
typename S::size_type
|
||||||
size () const
|
size () const
|
||||||
@@ -94,6 +100,8 @@ m4_define([b4_stack_define],
|
|||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
stack (const stack&);
|
||||||
|
stack& operator= (const stack&);
|
||||||
/// The wrapped container.
|
/// The wrapped container.
|
||||||
S seq_;
|
S seq_;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -430,12 +430,7 @@ typedef short int yytype_int16;
|
|||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Suppress unused-variable warnings by "using" E. */
|
]b4_attribute_define[
|
||||||
#ifdef __GNUC__
|
|
||||||
# define YYUSE(E) ((void) (E))
|
|
||||||
#else
|
|
||||||
# define YYUSE(E) /* empty */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if ]b4_lac_if([[1]], [[! defined yyoverflow || YYERROR_VERBOSE]])[
|
#if ]b4_lac_if([[1]], [[! defined yyoverflow || YYERROR_VERBOSE]])[
|
||||||
|
|
||||||
|
|||||||
2
gnulib
2
gnulib
Submodule gnulib updated: 38e8c084b9...076ac82d1d
@@ -486,8 +486,8 @@ start:
|
|||||||
;
|
;
|
||||||
|
|
||||||
%%
|
%%
|
||||||
]AT_YYLEX_DEFINE(["a"])[
|
|
||||||
]AT_YYERROR_DEFINE[
|
]AT_YYERROR_DEFINE[
|
||||||
|
]AT_YYLEX_DEFINE(["a"])[
|
||||||
]AT_MAIN_DEFINE[
|
]AT_MAIN_DEFINE[
|
||||||
]])
|
]])
|
||||||
AT_BISON_OPTION_POPDEFS
|
AT_BISON_OPTION_POPDEFS
|
||||||
@@ -1679,8 +1679,8 @@ start:
|
|||||||
b: 'b';
|
b: 'b';
|
||||||
d: /* nada. */;
|
d: /* nada. */;
|
||||||
%%
|
%%
|
||||||
]AT_YYLEX_DEFINE(["abc"])[
|
|
||||||
]AT_YYERROR_DEFINE[
|
]AT_YYERROR_DEFINE[
|
||||||
|
]AT_YYLEX_DEFINE(["abc"])[
|
||||||
]AT_MAIN_DEFINE[
|
]AT_MAIN_DEFINE[
|
||||||
]])
|
]])
|
||||||
AT_BISON_OPTION_POPDEFS
|
AT_BISON_OPTION_POPDEFS
|
||||||
|
|||||||
Reference in New Issue
Block a user