bug-coreutils
[Top][All Lists]
Advanced

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

Re: recent const churn


From: Jim Meyering
Subject: Re: recent const churn
Date: Mon, 16 Jun 2008 17:49:38 +0200

Eric Blake <address@hidden> wrote:

> After the recent churn in const-qualification in coreutils.git, there are 
> still
> a couple of redundant qualifiers, as found by:
>
> $ git grep '\bconst\b[^*]*\bconst\b' -- '*.[ch]'
> src/ls.c:static const char const *long_time_format[2] =
> src/ls.c:static const qsortFunc const sort_functions[][2][2][2] =
> src/od.c:static const char const charname[33][4] =
>
> Sounds like an updated maintainer rule to check for redundant const might be
> useful?  Or, if you like enforcing your HACKING rule of 'type const'
> over 'const type', would adding a syntax-check rule to look for 'static const'
> be useful?

Thanks for keeping watch!
Anything to protect me from myself ;-)
If you feel like it, a patch would be most welcome.
Or I'll get to it.

I'm reluctant to make syntax-check rules too idiosyncratic.
Might be better to make them more generally useful.
That's why I relaxed the "struct option"-checking one
to accept either "const struct option" or "struct option const".




reply via email to

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