mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-16 15:53:03 +00:00
Work around portability problems with Visual Age C compiler
(xlc and xlC_r) reported by John P. Hartmann. * data/location.cc (initial_column, initial_line): Remove. All uses replaced by 0 and 1. * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31 that xlc complains about. * src/scan-skel.l (skel_wrap): Likewise.
This commit is contained in:
10
ChangeLog
10
ChangeLog
@@ -1,3 +1,13 @@
|
|||||||
|
2005-10-10 Paul Eggert <eggert@cs.ucla.edu>
|
||||||
|
|
||||||
|
Work around portability problems with Visual Age C compiler
|
||||||
|
(xlc and xlC_r) reported by John P. Hartmann.
|
||||||
|
* data/location.cc (initial_column, initial_line): Remove.
|
||||||
|
All uses replaced by 0 and 1.
|
||||||
|
* src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
|
||||||
|
that xlc complains about.
|
||||||
|
* src/scan-skel.l (skel_wrap): Likewise.
|
||||||
|
|
||||||
2005-10-10 Akim Demaille <akim@epita.fr>
|
2005-10-10 Akim Demaille <akim@epita.fr>
|
||||||
|
|
||||||
* examples/calc++/test: Be quiet unless VERBOSE.
|
* examples/calc++/test: Be quiet unless VERBOSE.
|
||||||
|
|||||||
@@ -43,20 +43,14 @@ namespace yy
|
|||||||
/// Abstract a position.
|
/// Abstract a position.
|
||||||
class position
|
class position
|
||||||
{
|
{
|
||||||
public:
|
|
||||||
/// Initial column number.
|
|
||||||
static const unsigned int initial_column = 0;
|
|
||||||
/// Initial line number.
|
|
||||||
static const unsigned int initial_line = 1;
|
|
||||||
|
|
||||||
/** \name Ctor & dtor.
|
/** \name Ctor & dtor.
|
||||||
** \{ */
|
** \{ */
|
||||||
public:
|
public:
|
||||||
/// Construct a position.
|
/// Construct a position.
|
||||||
position () :
|
position () :
|
||||||
filename (0),
|
filename (0),
|
||||||
line (initial_line),
|
line (1),
|
||||||
column (initial_column)
|
column (0)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
/** \} */
|
/** \} */
|
||||||
@@ -68,19 +62,19 @@ namespace yy
|
|||||||
/// (line related) Advance to the COUNT next lines.
|
/// (line related) Advance to the COUNT next lines.
|
||||||
inline void lines (int count = 1)
|
inline void lines (int count = 1)
|
||||||
{
|
{
|
||||||
column = initial_column;
|
column = 0;
|
||||||
line += count;
|
line += count;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// (column related) Advance to the COUNT next columns.
|
/// (column related) Advance to the COUNT next columns.
|
||||||
inline void columns (int count = 1)
|
inline void columns (int count = 1)
|
||||||
{
|
{
|
||||||
int leftmost = initial_column;
|
int leftmost = 0;
|
||||||
int current = column;
|
int current = column;
|
||||||
if (leftmost <= current + count)
|
if (leftmost <= current + count)
|
||||||
column += count;
|
column += count;
|
||||||
else
|
else
|
||||||
column = initial_column;
|
column = 0;
|
||||||
}
|
}
|
||||||
/** \} */
|
/** \} */
|
||||||
|
|
||||||
|
|||||||
@@ -24,6 +24,11 @@
|
|||||||
%option prefix="gram_" outfile="lex.yy.c"
|
%option prefix="gram_" outfile="lex.yy.c"
|
||||||
|
|
||||||
%{
|
%{
|
||||||
|
/* Work around a bug in flex 2.5.31. See Debian bug 333231
|
||||||
|
<http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=333231>. */
|
||||||
|
#undef gram_wrap
|
||||||
|
#define gram_wrap() 1
|
||||||
|
|
||||||
#include "system.h"
|
#include "system.h"
|
||||||
|
|
||||||
#include <mbswidth.h>
|
#include <mbswidth.h>
|
||||||
|
|||||||
@@ -23,6 +23,11 @@
|
|||||||
%option prefix="skel_" outfile="lex.yy.c"
|
%option prefix="skel_" outfile="lex.yy.c"
|
||||||
|
|
||||||
%{
|
%{
|
||||||
|
/* Work around a bug in flex 2.5.31. See Debian bug 333231
|
||||||
|
<http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=333231>. */
|
||||||
|
#undef skel_wrap
|
||||||
|
#define skel_wrap() 1
|
||||||
|
|
||||||
#include "system.h"
|
#include "system.h"
|
||||||
|
|
||||||
#include <error.h>
|
#include <error.h>
|
||||||
|
|||||||
Reference in New Issue
Block a user