bison-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] overquoting in implementation of %code and %defines


From: Joel E. Denny
Subject: Re: [PATCH] overquoting in implementation of %code and %defines
Date: Sun, 14 Jan 2007 17:05:21 -0500 (EST)

On Sun, 14 Jan 2007, Paolo Bonzini wrote:

> 
> > > m4_define([b4_prefix], [b4_get_percent_define([[prefix]], [[YY]])])
> > 
> > I don't want to encourage skeleton authors to define such an abbreviation
> > just in order to define a variable's default value.  It can suppress helpful
> > warnings about a variable that's sometimes unused.
> 
> No, it won't unless you actually use b4_prefix, i.e. unless the
> b4_get_percent_define is actually expanded.

Ouch.  Sorry, you're right of course.  Thanks.

> > This should work:
> > 
> >   m4_define_default([b4_percent_define_prefix], [[YY]])
> 
> This feature is useless, for the reason I gave above.

It's not useless.  I don't want to juggle yet another macro name (such as 
b4_prefix) for every variable name for which I want to define a default 
value.  I also don't want to have to define the same default value 
multiple times by passing it to every b4_get_percent_define invocation.  
I'd rather just keep it simple and use m4_define_default.

> It's better to make it
> look like m4_default etc.

Why is that better?

Well, I'd rather not have two ways to do the same thing, but I'm not sure 
the time it'll take to argue this through is worth it.  Later today I'll 
commit the patch and include your default argument.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]