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

macro 'ATOMIC_VAR_INIT' has been marked as deprecated #9041

Closed
tatsuhiro-t opened this issue Jun 23, 2022 · 2 comments
Closed

macro 'ATOMIC_VAR_INIT' has been marked as deprecated #9041

tatsuhiro-t opened this issue Jun 23, 2022 · 2 comments
Labels

Comments

@tatsuhiro-t
Copy link
Contributor

I did this

make with clang-14, which gives:

easy.c:97:34: error: macro 'ATOMIC_VAR_INIT' has been marked as deprecated [-Werror,-Wdeprecated-pragma]
static curl_simple_lock s_lock = CURL_SIMPLE_LOCK_INIT;
                                 ^
../lib/easy_lock.h:41:31: note: expanded from macro 'CURL_SIMPLE_LOCK_INIT'
#define CURL_SIMPLE_LOCK_INIT ATOMIC_VAR_INIT(false)
                              ^
/usr/lib/llvm-14/lib/clang/14.0.0/include/stdatomic.h:50:41: note: macro marked 'deprecated' here
#pragma clang deprecated(ATOMIC_VAR_INIT)
                                        ^
1 error generated.

I expected the following

I can build curl successfully

curl/libcurl version

[curl -V output]
master branch

operating system

Linux

@tatsuhiro-t
Copy link
Contributor Author

The macro is defined as follows:

/* 7.17.2 Initialization */

#define ATOMIC_VAR_INIT(value) (value)

@bagder bagder added the build label Jun 23, 2022
@bagder
Copy link
Member

bagder commented Jun 23, 2022

This seems to be the removal procedure:

The macro ATOMIC_VAR_INIT is basically useless for the purpose for which it was designed

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