getc in BSD (was FLEX issues)

Steve Kargl sgk at
Tue Jul 4 18:40:56 UTC 2006

On Mon, Jul 03, 2006 at 11:34:41AM -0700, Randall Hyde wrote:
> The error reported is "syntax error before numeric constant".
> This kind of gives me the impression that "getc" is defined a bit
> differently under FreeBSD than other environments?  Any ideas?

As others have stated, getc() is implemented via a macro,
which may depend on other macros.  In reading the flex 
NEWS file, I ran across the -Cr option.  I added this 
option to your flex command, and the hla.flx file is 
processed and produces a compilable lex.yy.c.


More information about the freebsd-hackers mailing list