From: David Gibson Subject: Re: [PATCH] Change yyerror to use stdarg so we can give more descriptive errors. Date: Sat, 16 Oct 2010 17:38:06 +1100 Message-ID: <20101016063806.GC5036@yookeroo> References: <20101016003239.3900.85967.stgit@riker> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <20101016003239.3900.85967.stgit@riker> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: devicetree-discuss-bounces+gldd-devicetree-discuss=m.gmane.org-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org Errors-To: devicetree-discuss-bounces+gldd-devicetree-discuss=m.gmane.org-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org To: John Bonesio Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org List-Id: devicetree@vger.kernel.org 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