getc in BSD (was FLEX issues)

Randall Hyde randyhyde at
Mon Jul 3 18:34:23 UTC 2006

Well, having a little bit of time to play around with the issues I'm having
with Flex under GCC, I've determined that the problem occurs in the
following code fragment:

   n = 0;
    n < num_to_read
   &&  (
     c =
      getc    <<<Error occurs on this line
      (EOF) &&
   && c != 'n';

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?
Randy Hyde

More information about the freebsd-hackers mailing list