Re: [PATCH 0/11] renaming argv_array

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

 



On Tue, Aug 11, 2020 at 06:08:22PM +0200, René Scharfe wrote:

> > This has bugged me for a while, so I decided to finally fix it. It
> > wasn't _too_ painful, though I'm sure there will be a little fallout
> > with topics in flight.
> 
> Just as this landed in master now, https://lobste.rs/ decided to link to
> http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2493.pdf, which is a
> paper about reserved identifiers in C.  It contains a nice overview.
> 
> Anyway, 7.31 of C11 says: "All external names described below are
> reserved no matter what headers are included by the program."  And
> 7.31.13 goes on: "Function names that begin with str, mem, or wcs and a
> lowercase letter may be added to the declarations in the <string.h>
> header."  So the names of the strvec functions are reserved.

It was the same in C99. I think this is one of those cases where we need
to worry less about what the standard says and more about what the real
world does. As long as we're ready for C25 or whatever to add "strvec"
and we accept that we'll need to change the name then, I'm not
particularly concerned. A compiler that starts warning about "str"
functions in the meantime would be impractical I think (forget strbuf,
stuff like strip_extension() would be illegal).

> Also how about using Coccinelle and patience to reduce the impact of
> such a change next time?  I.e. adding the new thing, providing a
> semantic patch for converting old code, waiting a reasonable amount of
> time after the last conversion was necessary and then removing the
> old thing.

So I almost sent a rant about Coccinelle along with this series. :)

Debian unstable now ships coccinelle 1.0.8, and it's unbelievably slow
compared to 1.0.4. Running "make coccicheck" is currently at 80 minutes
of CPU time running each script in parallel, with none of them down.
They're also all consuming 6GB of RAM each, so I'm killing them all.

I got somewhere similar when I was working on this series, got fed up,
and then just did the whole thing with grep, which was easier. I'm open
to the idea that a slower transition might have helped topics in flight
catch up, but it also would have prolonged the pain. So I dunno.

-Peff



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux