aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTim J. Robbins <tjr@FreeBSD.org>2004-08-21 07:00:40 +0000
committerTim J. Robbins <tjr@FreeBSD.org>2004-08-21 07:00:40 +0000
commit17211a5f9a0963117be5a2aef12bcaa8312b2cc6 (patch)
tree591477643be7239310fc803ef18c49b7cc25ba86 /include
parent8c9610c9febb8d3c6f6fb5812c9e198bbda471fe (diff)
downloadsrc-17211a5f9a0963117be5a2aef12bcaa8312b2cc6.tar.gz
src-17211a5f9a0963117be5a2aef12bcaa8312b2cc6.zip
Let GCC know that ___runetype(), ___tolower() and ___toupper() are pure
functions, allowing it to generate better code for the <ctype.h> and <wctype.h> functions. For example, it can now keep _CurrentRuneLocale in a register across calls to these functions, and can delete calls to ___runetype() if the result is already known or not used.
Notes
Notes: svn path=/head/; revision=134101
Diffstat (limited to 'include')
-rw-r--r--include/_ctype.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/_ctype.h b/include/_ctype.h
index a1fc0a2e973e..1a42952a09dc 100644
--- a/include/_ctype.h
+++ b/include/_ctype.h
@@ -72,9 +72,9 @@
/* See comments in <sys/_types.h> about __ct_rune_t. */
__BEGIN_DECLS
-unsigned long ___runetype(__ct_rune_t);
-__ct_rune_t ___tolower(__ct_rune_t);
-__ct_rune_t ___toupper(__ct_rune_t);
+unsigned long ___runetype(__ct_rune_t) __pure;
+__ct_rune_t ___tolower(__ct_rune_t) __pure;
+__ct_rune_t ___toupper(__ct_rune_t) __pure;
__END_DECLS
/*