I don't know how to change the code, but it seems to be caused by
difference between Solaris lex & flex (flex 2.6.4). make check
passes if flex has priority over lex.
Thanks for the info. There are other deficiencies with support for
native Solaris tools -- https://bugs.gnu.org/42393. In that bug, a
similar error message about those tests when using the Solaris compiler
is reported. (So I was wrong, it's not really about changes in gcc,
except insofar as older gcc's might have accepted it.)
I have nothing against applying patches to improve the situation, if
Solaris users can figure out what to do, but I can't do anything about
fixing these problems myself. Sorry.
I marked this bug as "confirmed" and "needs help". --best, karl.