diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2020-09-17 09:45:21 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2020-09-17 09:46:01 -0700 |
commit | 8125325281a491de9e0a6edc3c4d40d77c026114 (patch) | |
tree | 57d2b053c0ce49f8c004c26c9ca2b8f3fdd96827 /lib/cdefs.h | |
parent | d7d69621581065274582c78981b58dbce4313d2c (diff) | |
download | gnulib-8125325281a491de9e0a6edc3c4d40d77c026114.tar.gz |
libc-config: port __THROW to Ubuntu 4
* lib/cdefs.h (__THROW): Do not use __attribute__ ((__nothrow__))
for GCC 3.3. Problem reported by Jeffrey Walton in:
https://lists.gnu.org/r/bug-gnulib/2019-07/msg00058.html
The GCC 3.3.4 documentation says the attribute should work, but
apparently it does not work on Ubuntu 4’s GCC 3.3. There seems
little point or desire to research this circa-2004 platform further,
so just avoid the attribute there.
Diffstat (limited to 'lib/cdefs.h')
-rw-r--r-- | lib/cdefs.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/cdefs.h b/lib/cdefs.h index 1ae9ffc774..b4ac4df66d 100644 --- a/lib/cdefs.h +++ b/lib/cdefs.h @@ -75,11 +75,11 @@ /* GCC can always grok prototypes. For C++ programs we add throw() to help it optimize the function calls. But this works only with - gcc 2.8.x and egcs. For gcc 3.2 and up we even mark C functions + gcc 2.8.x and egcs. For gcc 3.4 and up we even mark C functions as non-throwing using a function attribute since programs can use the -fexceptions options for C code as well. */ # if !defined __cplusplus \ - && (__GNUC_PREREQ (3, 3) || __glibc_clang_has_attribute (__nothrow__)) + && (__GNUC_PREREQ (3, 4) || __glibc_clang_has_attribute (__nothrow__)) # define __THROW __attribute__ ((__nothrow__ __LEAF)) # define __THROWNL __attribute__ ((__nothrow__)) # define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct |