/
auroraos
/
mirror_SafeInt
Обзор
Документация
Войти
/
auroraos
/
mirror_SafeInt
Код
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
master
Test/TestMain.h
36 строк
1 KB
David LeBlanc
Fix UB in align, and an actual bug (#80)
10 май 2026, 10:32
Не верифицирован
10 май 2026, 10:32
e4fb153
Код
Авторство
О чём код?
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #if !defined __GNUC__ #pragma warning( disable: 4571 4820 4514 4987 4710 4309 4986 4548 4365 4625 4626 5026 5027 4774) // relative include path contains '..' // (function) selected for automatic inline expansion #pragma warning( disable: 4464 4711 ) #include <crtdbg.h> #endif #include "../SafeInt.hpp" // Suppress warnings in test files, but not in source header #if SAFEINT_COMPILER == VISUAL_STUDIO_COMPILER // Disable Spectre mitigation warnings (5045) #pragma warning(disable: 4838 4477 4310 5045) #elif SAFEINT_COMPILER == CLANG_COMPILER #pragma GCC diagnostic ignored "-Wc++11-narrowing" #elif SAFEINT_COMPILER == GCC_COMPILER #pragma GCC diagnostic ignored "-Wnarrowing" #endif namespace mult_verify { void MultVerify(); } namespace div_verify { void DivVerify(); } namespace sub_verify { void SubVerify(); } namespace add_verify { void AddVerify(); } namespace mod_verify { void ModVerify(); } namespace incdec_verify { void IncDecVerify(); } namespace cast_verify { void CastVerify(); } namespace negation_verify { void NegationVerify(); } namespace shift_verify { void ShiftVerify(); } #if defined SAFEINT_TEST_ALIGN namespace align_verify { void AlignVerify(); } #endif