This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 5/6] ldbl-128: Use L(x) macro for long double constants
On Tue, 16 Aug 2016, Paul E. Murphy wrote:
> On 08/16/2016 01:12 PM, Joseph Myers wrote:
> > This is a case where the script that generated the patch is as important
> > for review as the patch itself. If there are some automated and some
> > manual changes, they need separating, e.g. a patch for using integer
> > constants separate from a patch converting remaining *L constants to use
> > the macro.
>
> Do the means to arrive at the patch really matter? I honestly didn't keep
> track of them since most were ad-hoc regex replacements. I walked through
> each file and applied, and fixed as necessary. These files did not lend
> themselves well to simple regex replacement. I walked through these changes
> in a graphical difftool (meld) as looking at a unified diff is both
> tedious and error prone.
It's a matter of reviewability, as I said in
<https://sourceware.org/ml/libc-alpha/2016-05/msg00092.html> - "It's
critical that the conversion is scripted, as reviewability of the
conversion will mean that what's reviewed must be a small clean script
that does the conversion and maybe a small subsequent fix-up patch, not an
enormous patch with massive semi-automatic source changes which are
effectively unreviewable.".
C can readily be lexed in a script by regular expressions that identify
comments, string and character constants, and tokens to sufficient
accuracy to find floating constants, given that real code shouldn't do
anything particularly tricky such as backslash-newline (or ??/-newline,
with a trigraph for backslash) between '/' and '*' starting a comment or
'*' and '/' ending a comment (so effectively you don't need to do anything
about backslash-newline when lexing).
> Moreso, is the generic naming and usage of the L(x) macro acceptable? If
> so, I can rework into smaller changes once we find general consensus on
> how to share these files with float128.
I think that name and usage are OK (given that it's only used within
ldbl-128 and not defined outside of users of that code).
--
Joseph S. Myers
joseph@codesourcery.com