[PATCH] Change yyerror to use stdarg so we can give more descriptive errors.

David Gibson david at gibson.dropbear.id.au
Sat Oct 16 17:38:06 EST 2010


On Fri, Oct 15, 2010 at 05:33:04PM -0700, John Bonesio wrote:
> The subject pretty much says it all. The patch is to allow dtc to
> give more descriptive errors by having yyerror take a variable
> number of parameters printf style.

Sorry, nack.  yyerror() is provided for bison's convenience and is
defined by that interface to be void yyerror(const char *s).  We just
use it explicitly because it happens to be there.

Yes, I know it's unlikely that bison would supply a string with format
specifiers which would mess things up but I'm still not comfortable
changing the signature when there's no need.  If you want a varargs
error printing function, define and use one (well, if srcpos_error()
isn't close enough) instead of yyerror().

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson


More information about the devicetree-discuss mailing list