Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The dsp/benchmarks won't compile with clang #103

Closed
gtjoseph opened this issue Feb 1, 2021 · 2 comments
Closed

The dsp/benchmarks won't compile with clang #103

gtjoseph opened this issue Feb 1, 2021 · 2 comments

Comments

@gtjoseph
Copy link

gtjoseph commented Feb 1, 2021

Lots of alignment complaints. Not a big deal for now. I was getting better performance in the converter and hirate demod with clang but starch may make that a moot point.

In file included from dsp/generated/benchmark.c:1259:
dsp/generated/../benchmark/magnitude_sc16_benchmark.c:11:16: error: '_Alignof' applied to an expression is a GNU extension [-Werror,-Wgnu-alignof-expression]
    if (!(in = STARCH_BENCHMARK_ALLOC(len, *in)) || !(out_mag = STARCH_BENCHMARK_ALLOC(len, *out_mag))) {
               ^
dsp/generated/benchmark.c:1256:81: note: expanded from macro 'STARCH_BENCHMARK_ALLOC'
#define STARCH_BENCHMARK_ALLOC(_count, _type) starch_benchmark_aligned_alloc(1, alignof(_type), (_count) * sizeof(_type))
                                                                                ^
/usr/lib64/clang/11.0.0/include/stdalign.h:15:17: note: expanded from macro 'alignof'
#define alignof _Alignof
                ^
@mutability
Copy link

decltype would be nice here but it's C++ only. typeof is another gcc extension, I wonder if clang is happier about that. Otherwise we'll need to explicitly provide the type name.

@mutability
Copy link

clang doesn't like typeof, so I'll just switch to explicit typenames

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants