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

Compile error on old gcc #12124

Closed
dfandrich opened this issue Oct 15, 2023 · 0 comments
Closed

Compile error on old gcc #12124

dfandrich opened this issue Oct 15, 2023 · 0 comments
Labels

Comments

@dfandrich
Copy link
Contributor

I did this

Compiling on FreeBSD 6.2 on gcc 3.4.6 (from over 16 years ago) gives this error:

tool_urlglob.c:77 error: implicit declaration of function `__builtin_mul_overflow'

Presumably, this was added to gcc some time between 3.4 and 6 and the #ifdef needs to check the gcc version. Since we're supporting C89, one can't complain that this is too old a compiler.

I expected the following

This old compiler should work (and after fixing the above, it does).

curl/libcurl version

curl 8.4.0-dev

operating system

FreeBSD 6.2 i386

@jay jay added the build label Oct 15, 2023
jay added a commit to jay/curl that referenced this issue Oct 15, 2023
- Don't use __builtin_mul_overflow for GCC 4 and earlier.

The function was added in GCC 5.

Ref: https://gcc.gnu.org/gcc-5/changes.html

Reported-by: Dan Fandrich

Fixes curl#12124
Closes #xxxx
@jay jay closed this as completed in 82aa064 Oct 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging a pull request may close this issue.

2 participants