<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - POWER8 and "error: unknown type name 'inline'" when using -std=c89"
href="https://bugs.llvm.org/show_bug.cgi?id=46571">46571</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>POWER8 and "error: unknown type name 'inline'" when using -std=c89
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>8.0
</td>
</tr>
<tr>
<th>Hardware</th>
<td>Other
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>C
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>noloader@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>blitzrakete@gmail.com, dgregor@apple.com, erik.pilkington@gmail.com, llvm-bugs@lists.llvm.org, richard-llvm@metafoo.co.uk
</td>
</tr></table>
<p>
<div>
<pre>I'm working with a project that wishes to use -std=c89 -pedantic for
testing.[1]
Compiling a POWER8 source file that uses vector built-ins [2], such as vec_ld,
results in the following. It looks like Clang disagrees with 'inline' from
<altivec.h>.
I don't have a reproducer at the moment. The only POWER8 machine I have access
to with Clang 8.0 is at Travis. The GCC compile farm has old versions of Clang,
and I am getting different compile errors.
>From [2]:
clang-8 blake2sp.c blake2s.c -o blake2sp -O3 -I../testvectors -Wall -Wextra
-std=c89 -pedantic -Wno-long-long -mcpu=power8 -DBLAKE2SP_SELFTEST
In file included from blake2b.c:21:
In file included from ./blake2-impl.h:35:
/usr/lib/llvm-8/lib/clang/8.0.0/include/altivec.h:16173:8: error: unknown type
name 'inline'
static inline __ATTRS_o_ai vector bool char vec_reve(vector bool char __a) {
^
/usr/lib/llvm-8/lib/clang/8.0.0/include/altivec.h:16173:15: error: expected
identifier or '('
static inline __ATTRS_o_ai vector bool char vec_reve(vector bool char __a) {
^
/usr/lib/llvm-8/lib/clang/8.0.0/include/altivec.h:56:22: note: expanded from
macro '__ATTRS_o_ai'
#define __ATTRS_o_ai __attribute__((__overloadable__, __always_inline__))
^
...
[1] <a href="https://travis-ci.org/github/noloader/BLAKE2/jobs/704535813">https://travis-ci.org/github/noloader/BLAKE2/jobs/704535813</a>
[2] <a href="https://github.com/BLAKE2/BLAKE2/blob/master/power8/blake2b.c">https://github.com/BLAKE2/BLAKE2/blob/master/power8/blake2b.c</a></pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>