Re: C11 and C++11 support detection fails with clang

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Feb 23, 2016 at 23:18:06 -0800, Mike Miller wrote:
> The attached patch fixes the error in _AC_CXX_CXX11_TEST_BODY
> (initializing a char* with a string constant is a warning in gcc but an
> error in clang). Look OK?

Attached for real this time.

-- 
mike
diff --git a/lib/autoconf/c.m4 b/lib/autoconf/c.m4
index fe87dbf..bf9389f 100644
--- a/lib/autoconf/c.m4
+++ b/lib/autoconf/c.m4
@@ -2453,9 +2453,9 @@ AC_DEFUN([_AC_CXX_CXX11_TEST_BODY],
 }
 {
   // Unicode literals
-  char *utf8 = u8"UTF-8 string \u2500";
-  char16_t *utf16 = u"UTF-8 string \u2500";
-  char32_t *utf32 = U"UTF-32 string \u2500";
+  const char *utf8 = u8"UTF-8 string \u2500";
+  const char16_t *utf16 = u"UTF-8 string \u2500";
+  const char32_t *utf32 = U"UTF-32 string \u2500";
 }
 ]])
 
_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
https://lists.gnu.org/mailman/listinfo/autoconf

[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux