[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gnulib-bug
Subject:    Re: max_align_t fails with clang 6.1 on OS X 10.10
From:       Chris Simpkins <chris () sourcefoundry ! org>
Date:       2017-08-30 14:38:30
Message-ID: de97feef-b492-4b9f-b04f-5c87899d2a6b () Spark
[Download RAW message or body]

Full gnulib stddef.h header file requested by Werner available here:  \
https://gist.github.com/chrissimpkins/6e76999d84ca6ff36cf8f7ef047997f4

max_align_t definition from `cat \
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/6.1.0/include/stddef.h` \
on Travis OS X 10.10 builds:

#if __STDC_VERSION__ >= 201112L || __cplusplus >= 201103L
#if !defined(__CLANG_MAX_ALIGN_T_DEFINED) || __has_feature(modules)
#if defined(_MSC_VER)
typedef double max_align_t;
#elif defined(__APPLE__)
typedef long double max_align_t;
#else
// Define 'max_align_t' to match the GCC definition.
typedef struct {
long long __clang_max_align_nonce1
     __attribute__((__aligned__(__alignof__(long long))));
long double __clang_max_align_nonce2
     __attribute__((__aligned__(__alignof__(long double))));
} max_align_t;
#endif



On Aug 30, 2017, 3:45 AM -0400, Bruno Haible <bruno@clisp.org>, wrote:
> Werner LEMBERG wrote:
> > Shall I simply add
> > 
> > AC_LANG_PUSH([C++])
> > 
> > right before the call to
> > 
> > gl_INIT
> > 
> > in my `configure.ac' file?
> 
> It's worth a try, yes. If it creates other problems, we can look into these.
> 
> Bruno
> 


[Attachment #3 (text/html)]

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
</head>
<body>
<div name="messageBodySection" style="font-size: 14px; font-family: -apple-system, \
BlinkMacSystemFont, sans-serif;"> <div>Full gnulib stddef.h header file requested by \
Werner available here:&#160;<a \
href="https://gist.github.com/chrissimpkins/6e76999d84ca6ff36cf8f7ef047997f4">https://gist.github.com/chrissimpkins/6e76999d84ca6ff36cf8f7ef047997f4</a></div>
 <div><br /></div>
max_align_t definition from `cat \
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/6.1.0/include/stddef.h` \
on Travis OS X 10.10 builds: <div>
<div><br /></div>
<div>
<pre>#<span class="pl-k">if</span> __STDC_VERSION__ &gt;= 201112L || __cplusplus \
&gt;= 201103L #<span class="pl-k">if</span> !defined(__CLANG_MAX_ALIGN_T_DEFINED) || \
__has_feature(modules) #<span class="pl-k">if</span> defined(_MSC_VER)
<span class="pl-k">typedef</span> <span class="pl-k">double</span> <span \
class="pl-c1">max_align_t</span>; #<span class="pl-k">elif</span> defined(__APPLE__)
<span class="pl-k">typedef</span> <span class="pl-k">long</span> <span \
class="pl-k">double</span> <span class="pl-c1">max_align_t</span>; #<span \
class="pl-k">else</span> <span class="pl-c"><span class="pl-c">//</span> Define \
'max_align_t' to match the GCC definition.</span> <span class="pl-k">typedef</span> \
<span class="pl-k">struct</span> {  <span class="pl-k">long</span> <span \
class="pl-k">long</span> __clang_max_align_nonce1  <span \
class="pl-c1">__attribute__</span>((<span class="pl-c1">__aligned__</span>(<span \
class="pl-c1">__alignof__</span>(<span class="pl-k">long</span> <span \
class="pl-k">long</span>))));  <span class="pl-k">long</span> <span \
class="pl-k">double</span> __clang_max_align_nonce2  <span \
class="pl-c1">__attribute__</span>((<span class="pl-c1">__aligned__</span>(<span \
class="pl-c1">__alignof__</span>(<span class="pl-k">long</span> <span \
class="pl-k">double</span>)))); } <span class="pl-c1">max_align_t</span>;
#<span class="pl-k">endif</span>
<br /></pre>
<pre><br /></pre></div>
</div>
</div>
<div name="messageReplySection" style="font-size: 14px; font-family: -apple-system, \
BlinkMacSystemFont, sans-serif;"><br /> On Aug 30, 2017, 3:45 AM -0400, Bruno Haible \
&lt;bruno@clisp.org&gt;, wrote:<br /> <blockquote type="cite" style="margin: 5px 5px; \
padding-left: 10px; border-left: thin solid #1abc9c;">Werner LEMBERG wrote:<br /> \
<blockquote type="cite" style="margin: 5px 5px; padding-left: 10px; border-left: thin \
solid #e67e22;">Shall I simply add<br /> <br />
AC_LANG_PUSH([C++])<br />
<br />
right before the call to<br />
<br />
gl_INIT<br />
<br />
in my `configure.ac' file?<br /></blockquote>
<br />
It's worth a try, yes. If it creates other problems, we can look into these.<br />
<br />
Bruno<br />
<br /></blockquote>
<div></div>
</div>
</body>
</html>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic