[tz] [PROPOSED] Bring back attribute_pure for getzname
Paul Eggert
eggert at cs.ucla.edu
Thu Nov 1 20:43:56 UTC 2018
* localtime.c (getzname, getqzname): Bring back ATTRIBUTE_PURE.
I was mistaken about GCC not needing this any more, as it’s
still needed with GCC 8.2.1 when building with
‘make GCC_INSTRUMENT= CFLAGS='$(GCC_DEBUG_FLAGS)'’.
---
localtime.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/localtime.c b/localtime.c
index 7b72f9c..ac3790a 100644
--- a/localtime.c
+++ b/localtime.c
@@ -789,7 +789,7 @@ static const int year_lengths[2] = {
** Return a pointer to that character.
*/
-static const char *
+static ATTRIBUTE_PURE const char *
getzname(register const char *strp)
{
register char c;
@@ -810,7 +810,7 @@ getzname(register const char *strp)
** We don't do any checking here; checking is done later in common-case code.
*/
-static const char *
+static ATTRIBUTE_PURE const char *
getqzname(register const char *strp, const int delim)
{
register int c;
--
2.19.1
More information about the tz
mailing list