[llvm-bugs] [Bug 46571] New: POWER8 and "error: unknown type name 'inline'" when using -std=c89
via llvm-bugs
llvm-bugs at lists.llvm.org
Thu Jul 2 20:49:14 PDT 2020
https://bugs.llvm.org/show_bug.cgi?id=46571
Bug ID: 46571
Summary: POWER8 and "error: unknown type name 'inline'" when
using -std=c89
Product: clang
Version: 8.0
Hardware: Other
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: C
Assignee: unassignedclangbugs at nondot.org
Reporter: noloader at gmail.com
CC: blitzrakete at gmail.com, dgregor at apple.com,
erik.pilkington at gmail.com, llvm-bugs at lists.llvm.org,
richard-llvm at metafoo.co.uk
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] https://travis-ci.org/github/noloader/BLAKE2/jobs/704535813
[2] https://github.com/BLAKE2/BLAKE2/blob/master/power8/blake2b.c
--
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/20200703/2955e212/attachment.html>
More information about the llvm-bugs
mailing list