[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: c: don't assume that UCHAR_MAX, etc. are defined
From: |
Paul Eggert |
Subject: |
Re: c: don't assume that UCHAR_MAX, etc. are defined |
Date: |
Thu, 10 Oct 2019 12:19:52 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.1.0 |
I installed the attached, which should fix the problem in a better way.
On RHEL 7.7 (GCC 4.8.5 20150623 (Red Hat 4.8.5-39)), 'make check' is now
outputting the following; although this is unrelated to the UCHAR_MAX
problem and doesn't break the build, I thought you might like to know.
The first diagnostic is C-related, the second C++.
CC examples/c/reccalc/reccalc-scan.o
examples/c/reccalc/scan.c: In function 'yy_fatal_error':
examples/c/reccalc/scan.c:1648:58: warning: unused parameter 'yyscanner'
[-Wunused-parameter]
static void yy_fatal_error (yyconst char* msg , yyscan_t yyscanner)
^
examples/c/reccalc/scan.c: In function 'yyalloc':
examples/c/reccalc/scan.c:1968:43: warning: unused parameter 'yyscanner'
[-Wunused-parameter]
void *yyalloc (yy_size_t size , yyscan_t yyscanner)
^
examples/c/reccalc/scan.c: In function 'yyrealloc':
examples/c/reccalc/scan.c:1973:58: warning: unused parameter 'yyscanner'
[-Wunused-parameter]
void *yyrealloc (void * ptr, yy_size_t size , yyscan_t yyscanner)
^
examples/c/reccalc/scan.c: In function 'yyfree':
examples/c/reccalc/scan.c:1985:36: warning: unused parameter 'yyscanner'
[-Wunused-parameter]
void yyfree (void * ptr , yyscan_t yyscanner)
^
...
CXX examples/c++/calc++/calc__-driver.o
./doc/bison.texi: In member function 'int driver::parse(const string&)':
./doc/bison.texi:12034:20: warning: declaration of 'parse' shadows a
member of 'this' [-Wshadow]
yy::parser parse (*this);
^
LEX examples/c++/calc++/scanner.cc
CXX examples/c++/calc++/calc__-scanner.o
examples/c++/calc++/scanner.cc:314:44: warning: zero as null pointer
constant [-Wzero-as-null-pointer-constant]
static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
^
examples/c++/calc++/scanner.cc:346:36: warning: zero as null pointer
constant [-Wzero-as-null-pointer-constant]
static char *yy_c_buf_p = (char *) 0;
^
examples/c++/calc++/scanner.cc:416:23: warning: zero as null pointer
constant [-Wzero-as-null-pointer-constant]
FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
^
examples/c++/calc++/scanner.cc:416:44: warning: zero as null pointer
constant [-Wzero-as-null-pointer-constant]
FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
^