1 //===----------------------------------------------------------------------===// 2 // 3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4 // See https://llvm.org/LICENSE.txt for license information. 5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6 // 7 //===----------------------------------------------------------------------===// 8 9 // test numeric_limits 10 11 // float_denorm_style 12 13 #include <limits> 14 15 #include "test_macros.h" 16 17 typedef char one; 18 struct two {one _[2];}; 19 20 one test(std::float_denorm_style); 21 two test(int); 22 main(int,char **)23int main(int, char**) 24 { 25 static_assert(std::denorm_indeterminate == -1, 26 "std::denorm_indeterminate == -1"); 27 static_assert(std::denorm_absent == 0, 28 "std::denorm_absent == 0"); 29 static_assert(std::denorm_present == 1, 30 "std::denorm_present == 1"); 31 static_assert(sizeof(test(std::denorm_present)) == 1, 32 "sizeof(test(std::denorm_present)) == 1"); 33 static_assert(sizeof(test(1)) == 2, 34 "sizeof(test(1)) == 2"); 35 36 return 0; 37 } 38