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

Syntax error when including complex.h #25

Closed
jeorsch opened this issue Mar 27, 2018 · 3 comments
Closed

Syntax error when including complex.h #25

jeorsch opened this issue Mar 27, 2018 · 3 comments

Comments

@jeorsch
Copy link

jeorsch commented Mar 27, 2018

When trying to process

#include <complex.h>

int main() {
}

I get a syntax error for cmathcalls.h. I use glibc version 2.19 and gcc 4.9.2.

Best regards

Georg Geiser

@dspinellis
Copy link
Owner

Hi Georg,

This is to be expected, because CScout currently lacks support for the _Complex keyword. Maybe

#define _Complex

would be enough for corresponding programs to compile.

@jeorsch
Copy link
Author

jeorsch commented Mar 28, 2018

Hi Diomidis,

Yes, it works. However, e.g. the FFTW library changes its API depending whether complex.h is included or not. Defining _Complex breaks the inclusion of fftw3.h. I can circumvent this for my application by not using FFTW, but maybe a native support of the standard library complex feature in CScout would make sense. There seem to be some more problems when using tgmath.h. I had syntax error when using fabs() in this case. Including math.h instead fixed this problem.

Thanks for your help!

Georg

@dspinellis
Copy link
Owner

Georg, regarding tgmath.h either a CScout-specific version of the header file must be provided, or the builtins used in the system-provided one must be defined.

I'm closing this issue and opening issue #26 for the required tasks.

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