[collectd] cpu.c is actually C99

Michael Shigorin mike at altlinux.org
Sat Nov 25 09:52:10 CET 2017


On Sat, Nov 25, 2017 at 08:11:40AM +0100, Florian Forster 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
> 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".

MCST guys mentioned that gcc will accept this particular arcane
feature in any mode (except when -pedantic), not just when told
explicitly it's -std=c99; lcc/e2k, or rather EDG's frontend,
would be strict.

So the request is rather about being explicit about -std :)

Glad to hear from you both!

-- 
 ---- WBR, Michael Shigorin / http://altlinux.org
  ------ http://opennet.ru / http://anna-news.info



More information about the collectd mailing list