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

error: call to undeclared function '_j1' #432

Open
kasper93 opened this issue Jun 11, 2024 · 1 comment
Open

error: call to undeclared function '_j1' #432

kasper93 opened this issue Jun 11, 2024 · 1 comment

Comments

@kasper93
Copy link

Source code

#include <math.h>

double foo(double a) {
    return _j1(a);
}

Expected Behavior

$ clang --version
clang version 17.0.3
Target: x86_64-pc-windows-msvc
$ clang --std=c17 -c c.c

Actual Behavior

$ clang --version
clang version 18.1.6
Target: x86_64-w64-windows-gnu
$ clang --std=c17 -c c.c
c.c:4:12: error: call to undeclared function '_j1'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
    4 |     return _j1(a);
      |            ^
1 error generated.

Those functions are declared behind #ifndef __STRICT_ANSI__, why?

@mati865
Copy link
Contributor

mati865 commented Jun 11, 2024

There is an upstream patch https://sourceforge.net/p/mingw-w64/mailman/message/58782943/ propose like it was said on IRC.

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