[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] maint.mk: new syntax check for HAVE_DECL checks
From: |
Jim Meyering |
Subject: |
Re: [PATCH] maint.mk: new syntax check for HAVE_DECL checks |
Date: |
Fri, 13 Jul 2012 22:15:35 +0200 |
Eric Blake wrote:
> Based on Karel's report, we might as well enforce a syntax check
> to help avoid future problems.
> https://lists.gnu.org/archive/html/coreutils/2012-06/msg00037.html
>
> * top/maint.mk (sc_prohibit_undefined_have_decl_tests): New rule.
> * cfg.mk
> (exclude_file_name_regexp--sc_prohibit_undefined_have_decl_tests):
> Exempt some false positives.
> Based on a report by Karel Zak.
> ---
>
> Thoughts on whether this is useful? Should we get rid of the
> sanity checks that use #error when a macro is undefined, in order
> to reduce the number of exemptions?
It's definitely worthwhile, considering the age of those bugs.
Thanks!
...
> +sc_prohibit_undefined_have_decl_tests:
> + prohibit='#[ ]*if(n?def|.*defined)[ ]*\)?HAVE_DECL_' \
Did you intend to allow an optional ")" just before HAVE_DECL_ ?
It might avoid a false positive or two to tighten up, adding \< and \> word
delimiters after "def", on both sides of "defined" and before HAVE_DECL_.
> + halt='$(ME): HAVE_DECL macros are always defined' \
> + $(_sc_search_regexp)