[zeek/spicy] 6a647d: Prefer attributes over `__declspec`

0 views
Skip to first unread message

Benjamin Bannier

unread,
Jun 3, 2026, 3:49:17 AM (3 days ago) Jun 3
to spicy-...@zeek.org
Branch: refs/heads/topic/bbannier/msvc-warnings
Home: https://github.com/zeek/spicy
Commit: 6a647d42d874e3d5bb66346c3f2eb5e269c98503
https://github.com/zeek/spicy/commit/6a647d42d874e3d5bb66346c3f2eb5e269c98503
Author: Benjamin Bannier <benjamin...@corelight.com>
Date: 2026-06-03 (Wed, 03 Jun 2026)

Changed paths:
M hilti/runtime/include/macros.h

Log Message:
-----------
Prefer attributes over `__declspec`

This should be a non-functional change for all supported compilers.


Commit: b07ec8ef38bb3e513b665f1028116ec973913061
https://github.com/zeek/spicy/commit/b07ec8ef38bb3e513b665f1028116ec973913061
Author: Benjamin Bannier <benjamin...@corelight.com>
Date: 2026-06-03 (Wed, 03 Jun 2026)

Changed paths:
M hilti/toolchain/src/ast/operators/port.cc

Log Message:
-----------
Fix declaration misplaced in include section


Commit: e7a3a51c899cecf7b19182060d68de69d0d11141
https://github.com/zeek/spicy/commit/e7a3a51c899cecf7b19182060d68de69d0d11141
Author: Benjamin Bannier <benjamin...@corelight.com>
Date: 2026-06-03 (Wed, 03 Jun 2026)

Changed paths:
M CMakeLists.txt

Log Message:
-----------
Suppress warnings from libunistd

With msvc this triggers a lot of warnings of the following form which
are not interesting for us to fix.

```
[162/444] Building CXX object hilti\toolchain\CMakeFiles\hilti-objects.dir\src\base\code-formatter.cc.obj
..\3rdparty\libunistd\unistd\unistd.h(79): warning C4273: 'read': inconsistent dll linkage
C:\Program Files (x86)\Windows Kits\10\include\10.0.26100.0\ucrt\corecrt_io.h(525): note: see previous definition of 'read'
```


Commit: f8089f70abb76d1ed28bcb2ac416c4662fa74d69
https://github.com/zeek/spicy/commit/f8089f70abb76d1ed28bcb2ac416c4662fa74d69
Author: Benjamin Bannier <benjamin...@corelight.com>
Date: 2026-06-03 (Wed, 03 Jun 2026)

Changed paths:
M hilti/toolchain/src/compiler/optimizer/passes/dead-code-static.cc

Log Message:
-----------
Be explicit about type to prevent possible narrowing

msvc warned about this

```
2
C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.44.35207\include\numeric(31): warning C4267: '=': conversion from 'size_t' to '_Ty', possible loss of data
C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.44.35207\include\numeric(31): note: the template instantiation context (the oldest one first) is
..\hilti\toolchain\src\compiler\optimizer\passes\dead-code-static.cc(68): note: see reference to function template instantiation '_Ty std::accumulate<std::_Tree_iterator<std::_Tree_val<std::_Tree_simple_types<std::pair<const hilti::ID,std::map<std::string,bool,std::less<std::string>,std::allocator<std::pair<const std::string,bool>>>>>>>,unsigned int,`anonymous-namespace'::Collector::run::<lambda_1>::()::<lambda_1>>(const _InIt,const _InIt,_Ty,_Fn)' being compiled
_InIt=std::_Tree_iterator<std::_Tree_val<std::_Tree_simple_types<std::pair<const hilti::ID,std::map<std::string,bool,std::less<std::string>,std::allocator<std::pair<const std::string,bool>>>>>>>,
_Fn=`anonymous-namespace'::Collector::run::<lambda_1>::()::<lambda_1>
```


Compare: https://github.com/zeek/spicy/compare/50e65b5e2719...f8089f70abb7

To unsubscribe from these emails, change your notification settings at https://github.com/zeek/spicy/settings/notifications
Reply all
Reply to author
Forward
0 new messages