[LLVMbugs] [Bug 18576] New: Failure to expand macro in pragma pack for MS compatibility

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Jan 21 19:58:01 PST 2014


            Bug ID: 18576
           Summary: Failure to expand macro in pragma pack for MS
           Product: clang
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: kumquats.a.pair at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

MSVC uses directives that look like:

#pragma push(pack,_CRT_PACKING)

When requesting preprocessed output specified on the command-line to clang-cl
("/P"), the output does not expand _CRT_PACKING.

Reproduction steps:
1. Create a file with #include <windows.h>
2. clang-cl /P <filename>
3. Observe results in <filename>.i by searching for #pragma

Expected Results:
- #pragma pack(push,_CRT_PACKING) should not be found and it should be #pragma

Other notes:
- This was observed by trying to compile a file using pre-processed source
output, so a good test case might be to #include <windows.h>, preprocess, then
try to compile the preprocessed file. If successful, it's fixed.

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/20140122/6e5f3f05/attachment.html>

More information about the llvm-bugs mailing list