>>> Robert Story <rst...@freesnmp.com> schrieb am 08.11.2016 um 22:15 in 
>>> Nachricht
<20161108161524.606df...@freesnmp.com>:
> On Tue, 8 Nov 2016 13:02:51 -0800 Bart wrote:
> BVA> On 11/08/2016 12:17 PM, Robert Story wrote:
> BVA> > Static buffers/arrays should be initialized before use. If
> BVA> > you find any that are used before they are initialized,
> BVA> > please file a bug and, if you can, submit a patch to fix
> BVA> > them.  
> BVA> 
> BVA> Hello Robert,
> BVA> 
> BVA> A quote from the C language standard (ISO/IEC 9899:201x):
> BVA> "6.9.2 External object definitions. [...]"
> BVA> 
> BVA> In other words, any toolchain that does not zero-initialize
> BVA> static variables violates the C standard. I don't think we
> BVA> should care about broken toolchains.
> 
> Is that new in 201x? How far back does this go in the standards?
> It's been a while, but the last time we discussed it, I believe the
> decision was made to support C89 an later. I might have missed a
> recent decision if that has changed, and of course we can revisit
> that if enough folks agree we should.

AFAIK, it goes back to the first C compiler in UNIX where all uninitialized 
static data was placed in a BSS segment, and during program load that segment 
was zeroed (letting avoid putting multiple zeros in the executable file). Old C 
compilers in MS-DOS (1985 or so) also had the corresponding segment zeroed. 
Today's mechanisms may be different, but the effect should be the same.

Ulrich

> 
> Robert
> 
> ------------------------------------------------------------------------------
> Developer Access Program for Intel Xeon Phi Processors
> Access to Intel Xeon Phi processor-based developer platforms.
> With one year of Intel Parallel Studio XE.
> Training and support from Colfax.
> Order your platform today. http://sdm.link/xeonphi 
> _______________________________________________
> Net-snmp-coders mailing list
> Net-snmp-coders@lists.sourceforge.net 
> https://lists.sourceforge.net/lists/listinfo/net-snmp-coders 





------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to