windows.cfg: Add support for `__alignof()` (#2271)
Reference: https://docs.microsoft.com/en-us/cpp/cpp/alignof-operator?view=vs-2019
This commit is contained in:
parent
4a4b4963cc
commit
e3fe559f0d
|
@ -6338,6 +6338,15 @@ HFONT CreateFont(
|
|||
<not-bool/>
|
||||
</arg>
|
||||
</function>
|
||||
<!-- __alignof Operator, declaration could look like this: size_t __alignof(type); -->
|
||||
<!-- _alignof is a synonym -->
|
||||
<function name="__alignof,_alignof">
|
||||
<noreturn>false</noreturn>
|
||||
<returnValue type="size_t"/>
|
||||
<use-retval/>
|
||||
<leak-ignore/>
|
||||
<arg nr="1" direction="in"/>
|
||||
</function>
|
||||
<podtype name="POINTER_SIGNED" sign="s"/>
|
||||
<podtype name="POINTER_UNSIGNED" sign="u"/>
|
||||
<podtype name="__time32_t" sign="s" size="4"/>
|
||||
|
|
|
@ -192,6 +192,9 @@ void validCode()
|
|||
|
||||
::PostMessage(nullptr, WM_QUIT, 0, 0);
|
||||
|
||||
printf("%zu", __alignof(int));
|
||||
printf("%zu", _alignof(double));
|
||||
|
||||
// Valid Library usage, no leaks, valid arguments
|
||||
HINSTANCE hInstLib = LoadLibrary(L"My.dll");
|
||||
FreeLibrary(hInstLib);
|
||||
|
|
Loading…
Reference in New Issue