Re: [PATCH] strbuf: use designated initializers in STRBUF_INIT

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

 



On Mon, Jul 10, 2017 at 10:57:57AM -0400, Ben Peart wrote:

> > If this patch can survive a few releases without complaint,
> > then we can feel more confident that designated initializers
> > are widely supported by our user base.  It also is an
> > indication that other C99 features may be supported, but not
> > a guarantee (e.g., gcc had designated initializers before
> > C99 existed).
> 
> Correct.  MSVC also supports designated initializers but does not fully
> support C99.

Out of curiosity, does MSVC define __STDC_VERSION__, and if so, to what?

> > And obviously before releasing this or anything similar, it would be
> > nice to see results from people building pu. I'm especially curious
> > whether MSVC would work with this (or if people even still use it, since
> > Git for Windows is pretty mature?).
> 
> We do use MSVC internally as that gives us access to the great debuggers and
> profilers on the Windows platform.  Fortunately, this particular C99
> construct _is_ supported by MSVC.  I applied the patch below and complied it
> with both MSVC and gcc for Windows and both builds succeeded.

Thanks. This kind of prompt testing and response is very appreciated. It
is unfortunate if we have to pick and choose C99-isms rather than using
the whole thing as a base. But that's probably just reality.

-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