bug-autoconf
[Top][All Lists]
Advanced

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

Re: Warnings for excessive macro arguments


From: Yavor Doganov
Subject: Re: Warnings for excessive macro arguments
Date: Mon, 23 Aug 2010 22:42:54 +0300
User-agent: Wanderlust/2.15.5 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (Gojō) APEL/10.7 Emacs/23.2 (i486-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO)

Eric Blake wrote:
> I have to wonder if there are cases where rejecting extra arguments
> might not be advisable,

No, the behavior should remain the same (silently ignoring them); any
change smells like a dangerous path to follow.  The only difference
would be the warnings (well, errors with -Werror, unfortunately).
Sorry if this wasn't clear from my message.

> That is, if 2.67 supports macro ABC(arg), then in 2.68 we add
> support for ABC(arg1, arg2), there is the question of whether the
> person calling ABC(arg1, arg2) will get sane semantics even if they
> use 2.67, by silently ignoring arg2.

I guess that if the handling of arg2 is important, the package should
AC_PREREQ([2.68]), IOW, requiring an implementation of the ABC macro
with two arguments.  Otherwise, arg2 should be discarded if 2.67 is
used as is the current behavior.  IMHO.  In the first scenario, the
warning would even give a hint to bump AC_PREREQ if that is what has
to be done.  (Typical case: one developer of a project adds a modern
autoconf macro, another developer with an older autoconf version
discovers this post factum.  For new macros not present in the old
version, this is a hard failure at autoconf time, but issues like
these may remain unnoticed.)

> Maybe the thing to do now is add mention of it in TODO, if we don't
> come up with a patch right away?

Sure, I didn't expect a patch right away...  (TBH, I expected an
outright reject because ignoring extra arguments may be considered as
an Autoconf feature.)

Apparently implementing this requires some thought, so it's perfectly
fine to document it as a wishlist item, if you decide so.



reply via email to

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