1 //===----------------------------------------------------------------------===// 2 // 3 // The LLVM Compiler Infrastructure 4 // 5 // This file is dual licensed under the MIT and the University of Illinois Open 6 // Source Licenses. See LICENSE.TXT for details. 7 // 8 //===----------------------------------------------------------------------===// 9 10 // test numeric_limits 11 12 // float_denorm_style 13 14 #include <limits> 15 16 typedef char one; 17 struct two {one _[2];}; 18 19 one test(std::float_denorm_style); 20 two test(int); 21 main()22int main() 23 { 24 static_assert(std::denorm_indeterminate == -1, 25 "std::denorm_indeterminate == -1"); 26 static_assert(std::denorm_absent == 0, 27 "std::denorm_absent == 0"); 28 static_assert(std::denorm_present == 1, 29 "std::denorm_present == 1"); 30 static_assert(sizeof(test(std::denorm_present)) == 1, 31 "sizeof(test(std::denorm_present)) == 1"); 32 static_assert(sizeof(test(1)) == 2, 33 "sizeof(test(1)) == 2"); 34 } 35