mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2025-01-18 12:24:38 +08:00
libctf: work with compilers not supporting GNU C attributes
The obvious fallback __attribute__ stanza was missing. Thanks to Harald van Dijk. PR 25120 libctf/ * ctf-impl.h (_libctf_printflike_): Add non-GNU-C fallback. (_libctf_unlikely_): Likewise. (_libctf_unused): Likewise. (_libctf_malloc_): Likewise.
This commit is contained in:
parent
2e428e7440
commit
866706584c
@ -1,3 +1,11 @@
|
||||
2020-06-26 Nick Alcock <nick.alcock@oracle.com>
|
||||
|
||||
PR libctf/25120
|
||||
* ctf-impl.h (_libctf_printflike_): Add non-GNU-C fallback.
|
||||
(_libctf_unlikely_): Likewise.
|
||||
(_libctf_unused): Likewise.
|
||||
(_libctf_malloc_): Likewise.
|
||||
|
||||
2020-06-26 Nick Alcock <nick.alcock@oracle.com>
|
||||
|
||||
PR libctf/25120
|
||||
|
@ -59,6 +59,13 @@ extern "C"
|
||||
#define _libctf_unused_ __attribute__ ((__unused__))
|
||||
#define _libctf_malloc_ __attribute__((__malloc__))
|
||||
|
||||
#else
|
||||
|
||||
#define _libctf_printflike_(string_index,first_to_check)
|
||||
#define _libctf_unlikely_(x) (x)
|
||||
#define _libctf_unused_
|
||||
#define _libctf_malloc_
|
||||
|
||||
#endif
|
||||
|
||||
/* libctf in-memory state. */
|
||||
|
Loading…
Reference in New Issue
Block a user