summaryrefslogtreecommitdiff
path: root/NEWS
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2017-06-27 18:34:30 -0700
committerGuy Harris <guy@alum.mit.edu>2017-06-28 01:35:53 +0000
commitf975c1712ed36be1eca5d99130d82c0a65353b08 (patch)
treeb17fe3ade7f688a8cbdc3fd47993840b76408195 /NEWS
parent39b22b7411401275d07e101c441f9892cf384def (diff)
downloadwireshark-f975c1712ed36be1eca5d99130d82c0a65353b08.tar.gz
Don't worry about initializing auto aggregates with non-constant values.
On UN*X, you can get C99-or-later compilers, and we request that in the autoconf script, so it's really a requirement. At least as I read https://msdn.microsoft.com/en-us/library/34h23df8%28v=vs.100%29.aspx Visual Studio 2010 (and earlier, going back to VS .NET 2003) supports the "Use of block-scope variables initialized with nonconstant expressions", with an example of an aggregate (array) initialization involving function calls, so it sounds as if it's available on Windows with any version of VS that we support. (If I've missed something, it'll presumably show up when something is built with MSVC, and we can update this at that point.) So the only thing to avoid is initializing global or static variables with a value that has to be evaluated at run time (the ability to do that is probably present in most environments, as I think C++ constructors for variables with static storage duration might have to be evaluated before main() is called, but I guess few C compilers bother to use it). Expand the example in the hopes of avoiding confusion between "static storage duration" (which something declared "static" has, but which anything declared with file scope, whether declared "static" or not, also has) and "static storage duration and internal linkage", which is what the "static" keyword specifies. Change-Id: I338eb0892e656c2ab59519e4bf76e1dfbec2fa7d Reviewed-on: https://code.wireshark.org/review/22434 Reviewed-by: Guy Harris <guy@alum.mit.edu> (cherry picked from commit e0a9192ebceba1e7d010a75592b101e4b80b952a) Reviewed-on: https://code.wireshark.org/review/22435
Diffstat (limited to 'NEWS')
0 files changed, 0 insertions, 0 deletions