mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 20:33:03 +00:00
* configure.in (WERROR_CFLAGS): Compute it.
* src/Makefile.am (CFLAGS): Pass it. * tests/atlocal.in (CFLAGS): Idem. * src/files.c: Fix a few warnings. (get_extension_index): Remove, unused.
This commit is contained in:
@@ -1,3 +1,11 @@
|
||||
2002-01-09 Akim Demaille <akim@epita.fr>
|
||||
|
||||
* configure.in (WERROR_CFLAGS): Compute it.
|
||||
* src/Makefile.am (CFLAGS): Pass it.
|
||||
* tests/atlocal.in (CFLAGS): Idem.
|
||||
* src/files.c: Fix a few warnings.
|
||||
(get_extension_index): Remove, unused.
|
||||
|
||||
2002-01-08 Akim Demaille <akim@epita.fr>
|
||||
|
||||
* src/getargs.c (AS_FILE_NAME): New.
|
||||
|
||||
@@ -51,6 +51,9 @@ AC_ARG_ENABLE(gcc-warnings,
|
||||
esac],
|
||||
[enableval=no])
|
||||
if test "${enableval}" = yes; then
|
||||
BISON_WARNING(-Werror)
|
||||
AC_SUBST([WERROR_CFLAGS], [$WARNING_CFLAGS])
|
||||
WARNING_CFLAGS=
|
||||
BISON_WARNING(-Wall)
|
||||
BISON_WARNING(-W)
|
||||
BISON_WARNING(-Wbad-function-cast)
|
||||
@@ -63,7 +66,6 @@ if test "${enableval}" = yes; then
|
||||
BISON_WARNING(-Wshadow)
|
||||
BISON_WARNING(-Wstrict-prototypes)
|
||||
BISON_WARNING(-Wwrite-strings)
|
||||
BISON_WARNING(-Werror)
|
||||
fi
|
||||
|
||||
# Checks for libraries.
|
||||
|
||||
@@ -22,7 +22,7 @@ DEFS = @DEFS@ \
|
||||
-DBISON_HAIRY=\"$(pkgdatadir)/bison.hairy\" \
|
||||
-DLOCALEDIR=\"$(datadir)/locale\"
|
||||
|
||||
CFLAGS = @CFLAGS@ $(WARNING_CFLAGS)
|
||||
CFLAGS = @CFLAGS@ $(WARNING_CFLAGS) $(WERROR_CFLAGS)
|
||||
YFLAGS = "-dv"
|
||||
|
||||
# libintl.h in is build/intl, intl/libgettext.h in src/,
|
||||
|
||||
27
src/files.c
27
src/files.c
@@ -253,27 +253,6 @@ tr (const char *in, char from, char to)
|
||||
return (temp);
|
||||
}
|
||||
|
||||
/* Gets the extension index in FILENAME. Returns 0 if fails to
|
||||
find an extension. */
|
||||
static int
|
||||
get_extension_index (const char *filename)
|
||||
{
|
||||
int len;
|
||||
|
||||
len = strlen (filename);
|
||||
|
||||
if (filename[len-- - 1] == '.')
|
||||
return (0);
|
||||
|
||||
while ((len > 0) && (filename[len - 1] != '.'))
|
||||
if (filename[len - 1] == '/')
|
||||
return (0);
|
||||
else
|
||||
len--;
|
||||
|
||||
return (len - 1);
|
||||
}
|
||||
|
||||
/* Computes extensions from the grammar file extension. */
|
||||
static void
|
||||
compute_exts_from_gf (const char *ext)
|
||||
@@ -338,7 +317,7 @@ filename_split (const char *filename,
|
||||
/* If there is an exentension, check if there is a `.tab' part right
|
||||
before. */
|
||||
if (*ext
|
||||
&& (*ext - *base) > strlen (".tab")
|
||||
&& (*ext - *base) > (int) strlen (".tab")
|
||||
&& (!strncmp (*ext - strlen (".tab"), ".tab", strlen (".tab"))
|
||||
|| !strncmp (*ext - strlen ("_tab"), "_tab", strlen ("_tab"))))
|
||||
*tab = *ext - strlen (".tab");
|
||||
@@ -351,9 +330,6 @@ static void
|
||||
compute_base_names (void)
|
||||
{
|
||||
const char *base, *tab, *ext;
|
||||
size_t base_length;
|
||||
size_t short_base_length;
|
||||
size_t ext_index;
|
||||
|
||||
/* If --output=foo.c was specified (SPEC_OUTFILE == foo.c),
|
||||
BASE_NAME and SHORT_BASE_NAME are `foo'.
|
||||
@@ -365,7 +341,6 @@ compute_base_names (void)
|
||||
files, remove the ".c" or ".tab.c" suffix. */
|
||||
if (spec_outfile)
|
||||
{
|
||||
const char *cp;
|
||||
filename_split (spec_outfile, &base, &tab, &ext);
|
||||
|
||||
/* The full base name goes up the EXT, excluding it. */
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
# @configure_input@ -*- shell-script -*-
|
||||
# Configurable variable values for Bison test suite.
|
||||
# Copyright 2000, 2001 Free Software Foundation, Inc.
|
||||
# Copyright 2000, 2001, 2002 Free Software Foundation, Inc.
|
||||
|
||||
# We need a C compiler.
|
||||
CC='@CC@'
|
||||
CFLAGS='@CFLAGS@ @WARNING_CFLAGS@'
|
||||
CFLAGS='@CFLAGS@ @WARNING_CFLAGS@ @WERROR_CFLAGS@'
|
||||
|
||||
# We need `config.h'.
|
||||
CPPFLAGS="-I$abs_top_builddir @CPPFLAGS@"
|
||||
|
||||
Reference in New Issue
Block a user