[LLVMbugs] [Bug 18822] New: VS2012 preprocessor string concatenation incompatibility

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Feb 12 14:53:49 PST 2014


            Bug ID: 18822
           Summary: VS2012 preprocessor string concatenation
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: Static Analyzer
          Assignee: kremenek at apple.com
          Reporter: ab at php.net
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

The error happens when including several headers like winsock2.h or winnt.h,
but it's laying deeper in the header driverspecs.h . Here's a snippet from the
static analyzer approach could be found here

In file included from C:\php-sdk\phpmaster\vc11\x64\php-src\win32\time.c:19:
In file included from C:\php-sdk\phpmaster\vc11\x64\php-src\win32/time.h:17:
In file included from C:\php-sdk\phpmaster\vc11\x64\php-src\main\php.h:34:
In file included from C:\php-sdk\phpmaster\vc11\x64\php-src\Zend\zend.h:42:
In file included from
In file included from C:\Program Files (x86)\Microsoft
In file included from C:\Program Files (x86)\Microsoft
In file included from C:\Program Files (x86)\Microsoft
C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Include\winnt.h:1202:1:
error: pasting formed '(__drv_nop', an invalid preprocessing token
C:\Program Files (x86)\Microsoft
SDKs\Windows\v7.1A\Include\driverspecs.h:358:3: note: expanded from macro
C:\Program Files (x86)\Microsoft
SDKs\Windows\v7.1A\Include\driverspecs.h:279:49: note: expanded from macro
        #define __drv_out(annotes) __post __$drv_group(##__drv_nop(annotes))

A simpler reproduce case, thanks to rnk from #llvm, is

11:41:41 PM) rnk: #define foo(x) puts(##x)
(11:41:41 PM) rnk: foo(y)

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/20140212/f65fe422/attachment.html>

More information about the llvm-bugs mailing list