From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12899 invoked by alias); 20 May 2002 18:14:38 -0000 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org Received: (qmail 12888 invoked from network); 20 May 2002 18:14:37 -0000 Received: from unknown (HELO email04.aon.at) (195.3.96.79) by sources.redhat.com with SMTP; 20 May 2002 18:14:37 -0000 Received: (qmail 311472 invoked from network); 20 May 2002 18:14:36 -0000 Received: from m717p001.adsl.highway.telekom.at (HELO there) ([62.47.249.129]) (envelope-sender ) by qmail5rs.highway.telekom.at (qmail-ldap-1.03) with SMTP for ; 20 May 2002 18:14:36 -0000 Content-Type: text/plain; charset="iso-8859-1" From: Gerhard Reuteler To: gcc-help@gcc.gnu.org Subject: treedraw: compilation error Date: Mon, 20 May 2002 11:14:00 -0000 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SW-Source: 2002-05/txt/msg00199.txt.bz2 Message-ID: <20020520111400.tna_UzCzYE0mHgaNgU8gprE-MczOc-BDQjbnzy9zASM@z> Hi, trying to compile an old source "treedraw", perhaps written for windows in 198?, I get the error message pismo:/usr/src/treedraw# make ................................. ................................. gcc -g -w -c lex.yy.c lex.yy.c:20: initializer element is not constant lex.yy.c:20: initializer element is not constant make: *** [lex.yy.o] Error 1 the file lex.yy.c looks like # include "stdio.h" # define U(x) ((x)&0377) # define NLSTATE yyprevious=YYNEWLINE # define BEGIN yybgin = yysvec + 1 + # define INITIAL 0 # define YYLERR yysvec # define YYSTATE (yyestate-yysvec-1) # define YYOPTIM 1 # define YYLMAX 200 # define output(c) putc(c,yyout) # define input() (((yytchar=yysptr>yysbuf?U(*--yysptr):getc(yyin))==10?(yylineno++,yytchar):yytchar)==EOF?0:yytchar) # define unput(c) {yytchar= (c);if(yytchar=='\n')yylineno--;*yysptr++=yytchar;} # define yymore() (yymorfg=1) # define ECHO fprintf(yyout, "%s",yytext) # define REJECT { nstr = yyreject(); goto yyfussy;} int yyleng; extern char yytext[]; int yymorfg; extern char *yysptr, yysbuf[]; int yytchar; FILE *yyin =stdin, *yyout =stdout; <---- this is line 20 As I don't know anything about C, I don't understand the problem. Any help is appreciated. so long Gerhard -- Gerhard Reuteler , Reitweg 26d , A-6830 Rankweil