[LLVMbugs] [Bug 10685] New: "pragma comment" followed by a comment while clang is started with -C

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Aug 17 05:19:56 PDT 2011


http://llvm.org/bugs/show_bug.cgi?id=10685

           Summary: "pragma comment" followed by a comment while clang is
                    started with -C
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: eremeev at viva64.com
                CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com


Starting the Clang preprocessor with -E -C command line options for the
following code:
#pragma comment (lib, "winmm.lib") //some comment
generates this error message:

pragma_comment.cpp:1:36: error: pragma comment requires parenthesized
identifier and optional string
#pragma comment (lib, "winmm.lib") //some comment
                                   ^
<scratch space>:2:1: note: expanded from:
/*some comment*/
^
#line 1 "pragma_comment.cpp"
#line 1 "pragma_comment.cpp"
#line 1 "<built-in>"
#line 1 "<built-in>"
#line 144 "<built-in>"
#line 1 "<command line>"
#line 1 "<built-in>"
#line 1 "pragma_comment.cpp"

1 error generated.

Also, this code is successfully preprocessed by clang without -C switch and by
MSVC compiler.

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list