вот конструкция
int *
__errno_location (void)
{
return &errno;
}
libc_hidden_def (__errno_location)
что означает последняя строчка? без возвращаемого значения, это похоже на определение макроса, но нет #define
и еще один вопрос, получаю вот такую ошибку:
| In file included from <command-line>:
| ./../include/libc-symbols.h:408:26: error: '__EI___errno_location' specifies less restrictive attributes than its target '__errno_location': 'const', 'nothrow' [-Werror=missing-attributes]
| 408 | extern __typeof (name) __EI_##name \
| | ^~~~~
| ./../include/libc-symbols.h:412:29: note: in expansion of macro '__hidden_ver1'
| 412 | # define hidden_def(name) __hidden_ver1(__GI_##name, name, name);
| | ^~~~~~~~~~~~~
| ./../include/libc-symbols.h:463:32: note: in expansion of macro 'hidden_def'
| 463 | # define libc_hidden_def(name) hidden_def (name)
| | ^~~~~~~~~~
| errno-loc.c:28:1: note: in expansion of macro 'libc_hidden_def'
| 28 | libc_hidden_def (__errno_location)
| | ^~~~~~~~~~~~~~~
| errno-loc.c:24:1: note: '__EI___errno_location' target declared here
| 24 | __errno_location (void)
| | ^~~~~~~~~~~~~~~~
пытаюсь сделать так:
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wmissing-attributes"
...
#pragma GCC diagnostic pop
тогда получаю эту ошибку заново
| In file included from <command-line>:
| ./../include/libc-symbols.h:412:26: error: '__EI___errno_location' specifies less restrictive attributes than its target '__errno_location': 'const', 'nothrow' [-Werror=missing-attributes]
| 412 | extern __typeof (name) __EI_##name \
| | ^~~~~
| ./../include/libc-symbols.h:417:29: note: in expansion of macro '__hidden_ver1'
| 417 | # define hidden_def(name) __hidden_ver1(__GI_##name, name, name);
| | ^~~~~~~~~~~~~
| ./../include/libc-symbols.h:468:32: note: in expansion of macro 'hidden_def'
| 468 | # define libc_hidden_def(name) hidden_def (name)
| | ^~~~~~~~~~
| errno-loc.c:28:1: note: in expansion of macro 'libc_hidden_def'
| 28 | libc_hidden_def (__errno_location)
| | ^~~~~~~~~~~~~~~
| errno-loc.c:24:1: note: '__EI___errno_location' target declared here
| 24 | __errno_location (void)
| | ^~~~~~~~~~~~~~~~
как поправить?