about summary refs log tree commit diff
path: root/libio
diff options
context:
space:
mode:
authorSergey Bugaev <bugaevc@gmail.com>2023-04-29 16:12:23 +0300
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2023-05-01 19:33:21 +0200
commite6a252758cbadb13654e66e1f2445ef6f8a4dea0 (patch)
tree77062c96855e8d5d81160ffc2b278753b267033d /libio
parentbe9ad3004f65b54dd6cc0325315559c72396bc1c (diff)
downloadglibc-e6a252758cbadb13654e66e1f2445ef6f8a4dea0.tar.gz
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 'libio')
-rw-r--r--libio/stdio.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/libio/stdio.h b/libio/stdio.h
index 45ddafdf20..2387590d6a 100644
--- a/libio/stdio.h
+++ b/libio/stdio.h
@@ -859,7 +859,7 @@ extern int ferror_unlocked (FILE *__stream) __THROW __wur;
 
    This function is a possible cancellation point and therefore not
    marked with __THROW.  */
-extern void perror (const char *__s);
+extern void perror (const char *__s) __COLD;
 
 
 #ifdef	__USE_POSIX