I have inherited some lex code that compiles cleanly on Solaris
(and AIX I believe), but refuses to compile on RedHat Linux...

    Lex does not complain when it parses the source file, but gcc
will not compile the resulting C code.

    Is there some additional switch that gcc needs when compiling the
code generated by flex ?

    I am not a lex guru...so any thoughts on this would be greatly
appreciated.

    This is what I get:
make[1]: Entering directory `/usr/local/wos/4.3/foo/lib/query_parser'

/usr/bin/env lex gblex.l
/usr/bin/env gcc -c -O3 lex.yy.c
-I/usr/local/perl5_6/lib/5.6.0/i686-linux/CORE -I/usr/include/gdbm
lex.yy.c:1329: parse error before `='
lex.yy.c:1334: conflicting types for `yy_c_buf_p'
lex.yy.c:219: previous declaration of `yy_c_buf_p'
lex.yy.c:1334: warning: initialization makes pointer from integer
without a castlex.yy.c:1334: initializer element is not constant
lex.yy.c:1334: warning: data definition has no type or storage class
lex.yy.c:1336: parse error before `if'
lex.yy.c:1390: initializer element is not constant
lex.yy.c:1390: warning: data definition has no type or storage class
lex.yy.c:1391: redefinition of `yy_c_buf_p'
lex.yy.c:1334: `yy_c_buf_p' previously defined here
lex.yy.c:1391: warning: data definition has no type or storage class
lex.yy.c:1392: conflicting types for `yy_hold_char'
lex.yy.c:211: previous declaration of `yy_hold_char'
lex.yy.c:1392: initializer element is not constant
lex.yy.c:1392: warning: data definition has no type or storage class
lex.yy.c:1395: parse error before `return'
lex.yy.c: In function `yy_switch_to_buffer':
lex.yy.c:1428: warning: assignment from incompatible pointer type
lex.yy.c: In function `yy_load_buffer_state':
lex.yy.c:1451: warning: assignment from incompatible pointer type
lex.yy.c:1451: warning: assignment from incompatible pointer type
make[1]: *** [lex.yy.o] Error 1
make[1]: Leaving directory `/usr/local/wos/4.3/foo/lib/query_parser'
make: *** [all] Error 2

Thanks,
    Mike



_______________________________________________
Redhat-devel-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-devel-list

Reply via email to