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

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Feb 12 15:01:23 PST 2014


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

Reid Kleckner <rnk at google.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |rnk at google.com
         Resolution|---                         |WORKSFORME

--- Comment #1 from Reid Kleckner <rnk at google.com> ---
We already have an compatibility for hack for this, added in r108624:

    Add another terrible VC++ compatibility hack: allow users to
    allow invalid token pastes (when in -fms-extensions mode)
    with -Wno-invalid-token-paste

It added this diagnostic:

--- a/include/clang/Basic/DiagnosticLexKinds.td
+++ b/include/clang/Basic/DiagnosticLexKinds.td
@@ -277,6 +277,9 @@ def err_too_few_args_in_macro_invoc : Error<
   "too few arguments provided to function-like macro invocation">;
 def err_pp_bad_paste : Error<
   "pasting formed '%0', an invalid preprocessing token">;
+def err_pp_bad_paste_ms : Warning<
+  "pasting formed '%0', an invalid preprocessing token">, DefaultError,
+  InGroup<DiagGroup<"invalid-token-paste">>;

So, this is a warning that's sort of also an error.  You can suppress it with
-Wno-invalid-token-paste, but a much better way to do it is to use -isystem to
provide paths to system headers like windows.h, in which case clang will
suppress all warnings in those files by default.

-- 
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/3bf19fdb/attachment.html>


More information about the llvm-bugs mailing list