[llvm-bugs] [Bug 42112] New: Preprocessor macro expansion bug on Windows

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Jun 3 04:18:35 PDT 2019


            Bug ID: 42112
           Summary: Preprocessor macro expansion bug on Windows
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Windows 2000
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: woodstock at gmx.us
                CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org,
                    neeilans at live.com, richard-llvm at metafoo.co.uk

The following code

#define BOOST_PP_CAT_II(p, res) res
#define BOOST_PP_CAT_I(a, b) BOOST_PP_CAT_II(~, a ## b)
#define BOOST_PP_CAT(a, b) BOOST_PP_CAT_I(a, b)
#define BOOST_PP_VARIADIC_ELEM_0(e0, ...) e0
#define BOOST_PP_VARIADIC_ELEM_I(n, ...)

should expand to nothing, which works fine on Linux with clang and gcc and on
Windows with VC++, but on Windows with clang it expands to


This can be reproduced simply with "clang.exe -E code.cpp", so it is
independent of Visual Studio, etc.

Obviously the code comes from the Boost Preprocessor library, but it affects
more the Boost VMD library, e.g. the macro BOOST_VMD_IS_TUPLE() works

You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190603/1b4185bc/attachment.html>

More information about the llvm-bugs mailing list