diff options
author | Brad King <brad.king@kitware.com> | 2012-03-20 19:42:18 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2012-03-20 19:49:49 (GMT) |
commit | 10272e6403bb73466af04c63ed6a3b97a4f70a33 (patch) | |
tree | 3ec9ac1e52dabbd96c520a3fb2c0c95aa2e2f444 | |
parent | f94ae0ecdac2fd8e8d68dde7dd16550bdee0493d (diff) | |
download | CMake-10272e6403bb73466af04c63ed6a3b97a4f70a33.zip CMake-10272e6403bb73466af04c63ed6a3b97a4f70a33.tar.gz CMake-10272e6403bb73466af04c63ed6a3b97a4f70a33.tar.bz2 |
KWIML: Avoid conflict with C++11 user-defined literals
Clang warns
test/test_INT_format.h:28:26: warning: identifier after literal will
be treated as a reserved user-defined literal suffix in C++11
[-Wc++11-compat-reserved-user-defined-literal]
" expression [%"KWIML_INT_PRI##PRI"],"
because the KWIML_... part is an identifier lexically immediately
following a string literal. Add a space between the string literal
and the identifier to avoid the C++11 user-defined literal syntax.
-rw-r--r-- | test/test_INT_format.h.in | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/test/test_INT_format.h.in b/test/test_INT_format.h.in index a8ea263..71b443d 100644 --- a/test/test_INT_format.h.in +++ b/test/test_INT_format.h.in @@ -25,8 +25,8 @@ T const x = VALUE(T, U); \ T y = C(V); \ printf(LANG #C ":" \ - " expression [%"@KWIML@_INT_PRI##PRI"]," \ - " literal [%"@KWIML@_INT_PRI##PRI"]", x, y); \ + " expression [%" @KWIML@_INT_PRI##PRI "]," \ + " literal [%" @KWIML@_INT_PRI##PRI "]", x, y); \ if(x == y) \ { \ printf(", PASSED\n"); \ @@ -42,7 +42,7 @@ { \ T const x = VALUE(T, U); \ char const* str = STR; \ - sprintf(buf, "%"@KWIML@_INT_PRI##PRI, x); \ + sprintf(buf, "%" @KWIML@_INT_PRI##PRI, x); \ printf(LANG "@KWIML@_INT_PRI" #PRI ":" \ " expected [%s], got [%s]", str, buf); \ if(strcmp(str, buf) == 0) \ @@ -62,13 +62,13 @@ T const x = VALUE(T, U); \ T y; \ char const* str = STR; \ - if(sscanf(str, "%"@KWIML@_INT_SCN##SCN, &y) != 1) \ + if(sscanf(str, "%" @KWIML@_INT_SCN##SCN, &y) != 1) \ { \ y = 0; \ } \ printf(LANG "@KWIML@_INT_SCN" #SCN ":" \ - " expected [%"@KWIML@_INT_PRI##PRI"]," \ - " got [%"@KWIML@_INT_PRI##PRI"]", x, y); \ + " expected [%" @KWIML@_INT_PRI##PRI "]," \ + " got [%" @KWIML@_INT_PRI##PRI "]", x, y); \ if(x == y) \ { \ printf(", PASSED\n"); \ |