t_1_020.cpp 1.0 KB

12345678910111213141516171819202122232425262728293031323334
  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 the handling of placeholder tokens, which have to be inserted, when
  9. // some macro expands into nothing (certainly these have to be ignored
  10. // afterwards :-)
  11. #define NIL
  12. #define A B NIL
  13. #define B() anything
  14. //R #line 21 "t_1_020.cpp"
  15. //R B()
  16. A() // not 'anything'!
  17. //H 10: t_1_020.cpp(14): #define
  18. //H 08: t_1_020.cpp(14): NIL=
  19. //H 10: t_1_020.cpp(16): #define
  20. //H 08: t_1_020.cpp(16): A=B NIL
  21. //H 10: t_1_020.cpp(17): #define
  22. //H 08: t_1_020.cpp(17): B()=anything
  23. //H 01: t_1_020.cpp(16): A
  24. //H 02: B NIL
  25. //H 01: t_1_020.cpp(14): NIL
  26. //H 02:
  27. //H 03: _
  28. //H 03: B_