From bf453d68393f7eea5965319e21311e56d71fa53c Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Tue, 16 Oct 2018 13:48:10 -0400 Subject: restore attribute((const)) to pthread_self and errno location decls revert commit a603a75a72bb469c6be4963ed1b55fabe675fe15. as a result of commit 1c84c99913bf1cd47b866ed31e665848a0da84a2 this is now safe, assuming an interpretation of the somewhat-underspecified attribute((const)) consistent with real-world usage. --- include/errno.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include/errno.h') diff --git a/include/errno.h b/include/errno.h index 93f5f6ec..0361b33a 100644 --- a/include/errno.h +++ b/include/errno.h @@ -9,6 +9,9 @@ extern "C" { #include +#ifdef __GNUC__ +__attribute__((const)) +#endif int *__errno_location(void); #define errno (*__errno_location()) -- cgit v1.2.1