Akim Demaille f41e0cf73c tests: do not depend on config.h
Currently we face test suite failures in different environments,
because of a conflict between the definitions of isnan by gnulib, and
by the C++ library:

    262. headers.at:186: testing Sane headers: %locations %debug c++ ...
    ./headers.at:186: COLUMNS=1000; export COLUMNS;  bison --color=no -fno-caret -d -o input.cc input.y
    ./headers.at:186: $CXX $CXXFLAGS $CPPFLAGS  -c -o input.o input.cc
    stderr:
    In file included from /usr/include/c++/4.8.2/cmath:44:0,
                     from /usr/include/c++/4.8.2/random:38,
                     from /usr/include/c++/4.8.2/bits/stl_algo.h:65,
                     from /usr/include/c++/4.8.2/algorithm:62,
                     from location.hh:41,
                     from input.hh:90,
                     from input.cc:50:
    /u/cs/fac/eggert/src/gnu/bison/lib/math.h: In function 'bool isnan(double)':
    /u/cs/fac/eggert/src/gnu/bison/lib/math.h:2849:1: error: new declaration 'bool isnan(double)'
     _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isnan, isnan, bool)
     ^
    In file included from /usr/include/features.h:375:0,
                     from /usr/include/c++/4.8.2/x86_64-redhat-linux/bits/os_defines.h:39,
                     from /usr/include/c++/4.8.2/x86_64-redhat-linux/bits/c++config.h:2097,
                     from /usr/include/c++/4.8.2/cstdlib:41,
                     from input.hh:48,
                     from input.cc:50:
    /usr/include/bits/mathcalls.h:235:1: error: ambiguates old declaration 'int isnan(double)'
     __MATHDECL_1 (int,isnan,, (_Mdouble_ __value)) __attribute__ ((__const__));
     ^

There might be something to do in gnulib about this, but I believe
that gnulib should not be used in the test suite in the first place.

The test suite should work with other compilers than the one used to
compile the package.  For a start, Bison sources are more
demanding (C99) than the generated parsers.  Last time I tried, tcc
for example, was not able to compile Bison, yet our generated parsers
should compile cleanly with it.

Besides the problem at hand is with the C++ compiler, with is not the
one used to set up gnulib at configuration-time (config.h is mainly
built from probing the C compiler).

We should really not depend on gnulib in tests.

This was introduced in 2001 to check whether including
stdlib.h/string.h is safe thanks to STDC_HEADERS
(2ce1014469).  Today, we assume at least
a C90 compiler, it should be safe enough.

* tests/local.at, tests/testsuite.h: Do not include config.h.
* tests/atlocal.in (conftest.cc): Likewise.
(CPPFLAGS): Do not expose lib/, as because of this we might picked up
gnulib replacement headers for system headers.

* tests/input.at: Use int instead of ptrdiff_t, for easier portability
(some machine on the CI did not find ptrdiff_t).
* tests/c++.at: Add missing include for getchar.
2019-10-10 17:53:48 +02:00
2019-10-10 17:53:48 +02:00
2019-01-05 14:58:05 +01:00
2019-09-11 09:07:27 +02:00
2019-09-22 07:48:10 +02:00
2019-10-09 07:28:26 +02:00
2019-04-23 19:28:08 +02:00
2018-05-19 15:17:28 +02:00
2019-10-10 17:53:48 +02:00
2019-09-22 07:48:10 +02:00
2006-01-22 07:59:51 +00:00
2006-01-22 07:59:51 +00:00
2019-01-05 14:58:05 +01:00
2019-01-12 09:38:57 +01:00
2019-10-09 07:28:26 +02:00
2007-08-15 20:21:33 +00:00
2019-01-05 14:58:05 +01:00
2019-02-12 06:19:10 +01:00
2019-01-05 14:58:05 +01:00
2019-10-06 12:15:12 +02:00
2019-10-06 11:59:16 -07:00

This package contains the GNU Bison parser generator.

* Installation
** Build from git
Here are basic installation instructions for a repository checkout:

    $ git submodules update --init
    $ ./bootstrap

then proceed with the usual 'configure && make' steps.

README-hacking contains more information about building and modifying the
software.

** Build for tarball
See the file INSTALL for generic compilation and installation instructions.

Bison requires GNU m4 1.4.6 or later.  See:

      https://ftp.gnu.org/gnu/m4/m4-1.4.6.tar.gz

** Relocatability
If you pass '--enable-relocatable' to 'configure', Bison is relocatable.

A relocatable program can be moved or copied to a different location on the
file system.  It can also be used through mount points for network sharing.
It is possible to make symlinks to the installed and moved programs, and
invoke them through the symlink.

See "Enabling Relocatability" in the documentation.

** Internationalization
Bison supports two catalogs: one for Bison itself (i.e., for the
maintainer-side parser generation), and one for the generated parsers (i.e.,
for the user-side parser execution).  The requirements between both differ:
bison needs ngettext, the generated parsers do not.  To simplify the build
system, neither are installed if ngettext is not supported, even if
generated parsers could have been localized.  See
http://lists.gnu.org/archive/html/bug-bison/2009-08/msg00006.html for more
details.

* Questions
See the section FAQ in the documentation (doc/bison.info) for frequently
asked questions.  The documentation is also available in PDF and HTML,
provided you have a recent version of Texinfo installed: run "make pdf" or
"make html".

If you have questions about using Bison and the documentation does not
answer them, please send mail to <help-bison@gnu.org>.

* Bug reports
Please send bug reports to <bug-bison@gnu.org>.  Be sure to include the
version number from 'bison --version', and a complete, self-contained test
case in each bug report.

* Copyright statements
For any copyright year range specified as YYYY-ZZZZ in this package, note
that the range specifies every single year in that closed interval.

-----

Local Variables:
mode: outline
fill-column: 76
ispell-dictionary: "american"
End:

Copyright (C) 1992, 1998-1999, 2003-2005, 2008-2015, 2018-2019 Free
Software Foundation, Inc.

This file is part of GNU bison, the GNU Compiler Compiler.

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
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.

# LocalWords:  parsers ngettext Texinfo pdf html YYYY ZZZZ ispell american
# LocalWords:  MERCHANTABILITY
Description
No description provided
Readme 18 MiB
Languages
C 61%
M4 11.7%
C++ 11.3%
Shell 4.1%
XSLT 3.1%
Other 8.8%