diff options
| author | Sergey Bugaev <bugaevc@gmail.com> | 2023-04-29 16:12:23 +0300 |
|---|---|---|
| committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2023-05-01 19:33:21 +0200 |
| commit | e6a252758cbadb13654e66e1f2445ef6f8a4dea0 (patch) | |
| tree | 77062c96855e8d5d81160ffc2b278753b267033d /misc/error.h | |
| parent | be9ad3004f65b54dd6cc0325315559c72396bc1c (diff) | |
| download | glibc-e6a252758cbadb13654e66e1f2445ef6f8a4dea0.tar.xz glibc-e6a252758cbadb13654e66e1f2445ef6f8a4dea0.zip | |
Mark various cold functions as __COLD
GCC docs explicitly list perror () as a good candidate for using
__attribute__ ((cold)). So apply __COLD to perror () and similar
functions.
Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
Message-Id: <20230429131223.2507236-3-bugaevc@gmail.com>
Diffstat (limited to 'misc/error.h')
| -rw-r--r-- | misc/error.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/misc/error.h b/misc/error.h index 185b39c641..4fbd46c775 100644 --- a/misc/error.h +++ b/misc/error.h @@ -29,11 +29,11 @@ __BEGIN_DECLS If STATUS is nonzero, terminate the program with `exit (STATUS)'. */ extern void error (int __status, int __errnum, const char *__format, ...) - __attribute__ ((__format__ (__printf__, 3, 4))); + __attribute__ ((__format__ (__printf__, 3, 4))) __COLD; extern void error_at_line (int __status, int __errnum, const char *__fname, unsigned int __lineno, const char *__format, ...) - __attribute__ ((__format__ (__printf__, 5, 6))); + __attribute__ ((__format__ (__printf__, 5, 6))) __COLD; /* If NULL, error will flush stdout, then print on stderr the program name, a colon and a space. Otherwise, error will call this |
