gcc's C parser bitten by error recovery changes in bison 1.50

Zack Weinberg zack@codesourcery.com
Wed Oct 16 13:55:00 GMT 2002


On Wed, Oct 16, 2002 at 01:32:18PM +0200, Gabriel Dos Reis wrote:
> Akim Demaille <akim@epita.fr> writes:
> 
> | gcc/build/gcc % ./cc1 /tmp/foo.c                                  nostromo 13:18
> |  a_translate
> | /tmp/foo.c: Dans la fonction «a_translate»:
> | /tmp/foo.c:7: error: erreur d'analyse syntaxique before '{' token
> | /tmp/foo.c:11: error: `p_addr' undeclared (first use in this function)
> | /tmp/foo.c:11: error: (Each undeclared identifier is reported only once
> | /tmp/foo.c:11: error: for each function it appears in.)
> 
> [ Not really related to the ongoing discussion ]
> 
>   Akim, how to manage to get GCC output such an unreadable message
> (neither English nor French :-)  Better no translation :-(

I think that's because the error message is being spliced together
from  "syntax error" and "%s before '%s' token" - look at yyerror().
There was a PR open on this sort of problem but I can't find it.

zw



More information about the Gcc-bugs mailing list