* src/assoc.c (assoc_to_string): Use a default: abort (); case

to pacify gcc -Wswitch-default.
* src/scan-gram.l (adjust_location): Use a default: break; case
to pacify gcc -Wswitch-default.
* src/scan-skel.h (skel_get_lineno, skel_get_in, skel_get_out):
(skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
(skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
Move these decls to scan-skel.l, since they don't need to be
visible elsewhere.
* src/scan-skel.l: Accept the above decls.
(skel_lex): New decl, to pacify GCC when unpatched flex 2.5.31
is used.
This commit is contained in:
Paul Eggert
2006-01-22 08:17:18 +00:00
parent f0064700f8
commit 06f01bc496
5 changed files with 41 additions and 22 deletions

View File

@@ -1,3 +1,18 @@
2006-01-22 Paul Eggert <eggert@cs.ucla.edu>
* src/assoc.c (assoc_to_string): Use a default: abort (); case
to pacify gcc -Wswitch-default.
* src/scan-gram.l (adjust_location): Use a default: break; case
to pacify gcc -Wswitch-default.
* src/scan-skel.h (skel_get_lineno, skel_get_in, skel_get_out):
(skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
(skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
Move these decls to scan-skel.l, since they don't need to be
visible elsewhere.
* src/scan-skel.l: Accept the above decls.
(skel_lex): New decl, to pacify GCC when unpatched flex 2.5.31
is used.
2006-01-21 Paul Eggert <eggert@cs.ucla.edu>
* Makefile.cfg (local-checks-to-skip): Add changelog-check,

View File

@@ -1,5 +1,5 @@
/* Associativity information.
Copyright (C) 2002, 2005 Free Software Foundation, Inc.
Copyright (C) 2002, 2005, 2006 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
@@ -29,6 +29,9 @@ assoc_to_string (assoc a)
{
switch (a)
{
default:
abort ();
case undef_assoc:
return "undefined associativity";
@@ -41,5 +44,4 @@ assoc_to_string (assoc a)
case non_assoc:
return "%nonassoc";
}
return NULL;
}

View File

@@ -752,12 +752,13 @@ adjust_location (location *loc, char const *token, size_t size)
break;
case '\t':
{
column = add_column_width (column, p0, p - p0);
column = add_column_width (column, NULL, 8 - ((column - 1) & 7));
p0 = p + 1;
break;
}
column = add_column_width (column, p0, p - p0);
column = add_column_width (column, NULL, 8 - ((column - 1) & 7));
p0 = p + 1;
break;
default:
break;
}
scanner_cursor.line = line;

View File

@@ -1,6 +1,6 @@
/* Scan Bison Skeletons.
Copyright (C) 2005 Free Software Foundation, Inc.
Copyright (C) 2005, 2006 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
@@ -26,16 +26,3 @@ extern FILE *skel_in;
extern FILE *skel_out;
extern int skel__flex_debug;
extern int skel_lineno;
/* Pacify "gcc -Wmissing-prototypes" when flex 2.5.31 is used. */
int skel_get_lineno (void);
FILE *skel_get_in (void);
FILE *skel_get_out (void);
int skel_get_leng (void);
char *skel_get_text (void);
void skel_set_lineno (int);
void skel_set_in (FILE *);
void skel_set_out (FILE *);
int skel_get_debug (void);
void skel_set_debug (int);
int skel_lex_destroy (void);

View File

@@ -39,6 +39,20 @@
#include "files.h"
#include "scan-skel.h"
/* Pacify "gcc -Wmissing-prototypes" when flex 2.5.31 is used. */
int skel_lex (void);
int skel_get_lineno (void);
FILE *skel_get_in (void);
FILE *skel_get_out (void);
int skel_get_leng (void);
char *skel_get_text (void);
void skel_set_lineno (int);
void skel_set_in (FILE *);
void skel_set_out (FILE *);
int skel_get_debug (void);
void skel_set_debug (int);
int skel_lex_destroy (void);
#define QPUTS(String) \
fputs (quotearg_style (c_quoting_style, String), yyout)