Hi Mike and Konstantin,

On Fri, Nov 24, 2017 at 09:51:52PM +0300, Konstantin Tokarev wrote:
> > ---
> > This was a new overloaded meaning given to static in C99. It is more than a
> > decade and a half old, but not all compiler writers have embraced all of C99
> > features -- so C99 as a whole largely remains unknown. – Happy Green Kid 
> > Naps
> > --- https://stackoverflow.com/a/16314194/94687
> 
> ...and compilers without C99 support remain unusable for many software 
> packages
> 
> https://github.com/collectd/collectd/blob/master/README#L709-L710

the Stackoverflow quote is overly dramatic: commonly used compilers
support the commonly used C99 features. "Mixed declarations", i.e.
declaring new variables anywhere in the block, not just the beginning,
are very widely supported and collectd's sources make extensive use of
the feature.

Using "static" for array arguments is one of the more arcane features in
C99 and support from compilers is poor. GCC and clang essentially treat
this similarly to the __attribute__((nonnull(i))) function attribute. If
this is causing trouble, I'd be in favor of simply removing these uses
of "static".

Best regards,
—octo
-- 
collectd – The system statistics collection daemon
Website: http://collectd.org
Google+: http://collectd.org/+
GitHub:  https://github.com/collectd
Twitter: http://twitter.com/collectd

Attachment: signature.asc
Description: Digital signature

_______________________________________________
collectd mailing list
collectd@verplant.org
https://mailman.verplant.org/listinfo/collectd

Reply via email to