t_4_004.cpp 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /*=============================================================================
  2. Boost.Wave: A Standard compliant C++ preprocessor library
  3. http://www.boost.org/
  4. Copyright (c) 2001-2012 Hartmut Kaiser. Distributed under the Boost
  5. Software License, Version 1.0. (See accompanying file
  6. LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  7. =============================================================================*/
  8. // Tests, whether invalid expression errors get ignored for 'passive' #elif
  9. // expressions
  10. #define USHRT_MAX 0xffffU
  11. // The number of bytes in a short.
  12. # if !defined (SIZEOF_SHORT)
  13. # if (USHRT_MAX) == 255U
  14. # define SIZEOF_SHORT 1
  15. # elif (USHRT_MAX) == 65535U
  16. # define SIZEOF_SHORT 2
  17. # elif (USHRT_MAX) == 4294967295U
  18. # define SIZEOF_SHORT 4
  19. # elif (USHRT_MAX) == 18446744073709551615U
  20. # define SIZEOF_SHORT 8
  21. # else
  22. # error: unsupported short size, must be updated for this platform!
  23. # endif /* USHRT_MAX */
  24. # endif /* !defined (SIZEOF_SHORT) */
  25. //R #line 32 "t_4_004.cpp"
  26. //R true
  27. #if SIZEOF_SHORT == 2
  28. true
  29. #else
  30. false
  31. #endif
  32. //H 10: t_4_004.cpp(12): #define
  33. //H 08: t_4_004.cpp(12): USHRT_MAX=0xffffU
  34. //H 10: t_4_004.cpp(15): # if
  35. //H 11: t_4_004.cpp(15): # if !defined (SIZEOF_SHORT): 1
  36. //H 10: t_4_004.cpp(16): # if
  37. //H 01: t_4_004.cpp(12): USHRT_MAX
  38. //H 02: 0xffffU
  39. //H 03: 0xffffU
  40. //H 11: t_4_004.cpp(16): # if (USHRT_MAX) == 255U: 0
  41. //H 10: t_4_004.cpp(18): # elif
  42. //H 01: t_4_004.cpp(12): USHRT_MAX
  43. //H 02: 0xffffU
  44. //H 03: 0xffffU
  45. //H 11: t_4_004.cpp(18): # elif (USHRT_MAX) == 65535U: 1
  46. //H 10: t_4_004.cpp(19): #define
  47. //H 08: t_4_004.cpp(19): SIZEOF_SHORT=2
  48. //H 10: t_4_004.cpp(20): # elif
  49. //H 10: t_4_004.cpp(22): # elif
  50. //H 10: t_4_004.cpp(27): # endif
  51. //H 10: t_4_004.cpp(31): #if
  52. //H 01: t_4_004.cpp(19): SIZEOF_SHORT
  53. //H 02: 2
  54. //H 03: 2
  55. //H 11: t_4_004.cpp(31): #if SIZEOF_SHORT == 2: 1
  56. //H 10: t_4_004.cpp(33): #else