From bug-octave-request at bevo dot che dot wisc dot edu Tue Nov 2 00:39:51 1999 Subject: Error compiling src/lex.cc with latest egcs snapshot From: "John W. Eaton" To: "Billinghurst, David (RTD)" Cc: "'bug-octave at bevo dot che dot wisc dot edu'" Date: Tue, 2 Nov 1999 00:39:21 -0600 (CST) On 1-Nov-1999, Billinghurst, David (RTD) wrote: | Bug report for Octave 2.1.19 configured for mips-sgi-irix6.5 | | Description: | ----------- | | When compiling with latest egcs-snapshot (egcs-19991025) I get the following | error | | /exd4/billingd/tmp/egcs-19991025/bin/g++ -c -I. | -I/usr/local/imports/octave-2.1.19/src -I.. -I../liboctave -I | ../src -I../libcruft/misc -I/usr/local/imports/octave-2.1.19 | -I/usr/local/imports/octave-2.1.19/liboctave -I/ | usr/local/imports/octave-2.1.19/src | -I/usr/local/imports/octave-2.1.19/libcruft/misc -I/usr/local/imports/oct | ave-2.1.19/glob -I../glob -DHAVE_CONFIG_H -fno-rtti -fno-exceptions | -fno-implicit-templates -g -O2 -Wall /usr | /local/imports/octave-2.1.19/src/lex.cc | lex.l: In function `int yywrap ()': | lex.l:746: `yywrap ()' was declared `extern' and later `static' | lex.l:193: previous declaration of `yywrap ()' | lex.l: In function `bool have_continuation (bool)': | lex.l:1536: warning: comparison is always true due to limited range of data | type | lex.l:1561: warning: comparison is always false due to limited range of data | type I think the following patch should fix these problems. Thanks, jwe 1999-11-02 John W. Eaton * lex.l (yywrap): No longer static. (have_continuation): Declare input character as int, not char, so comparison to EOF will work. Index: lex.l =================================================================== RCS file: /usr/local/cvsroot/octave/src/lex.l,v retrieving revision 1.146 diff -u -r1.146 lex.l --- lex.l 1999/08/20 19:12:25 1.146 +++ lex.l 1999/11/02 06:38:27 at @ -741,7 +741,7 @@ #ifdef yywrap #undef yywrap #endif -static int +int yywrap (void) { return 1; at @ -1532,7 +1532,7 @@ ostrstream buf; bool in_comment = false; - char c; + int c; while ((c = yyinput ()) != EOF) { buf << (char) c; --------------------------------------------------------------------- Octave is freely available under the terms of the GNU GPL. To ensure that development continues, see www.che.wisc.edu/octave/giftform.html Instructions for unsubscribing: www.che.wisc.edu/octave/archive.html ---------------------------------------------------------------------