Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/include We can make a stronger guarantee than __pure.



details:   https://anonhg.NetBSD.org/src/rev/cf2ad7d3f75b
branches:  trunk
changeset: 838153:cf2ad7d3f75b
user:      maya <maya%NetBSD.org@localhost>
date:      Sat Jan 05 09:16:46 2019 +0000

description:
We can make a stronger guarantee than __pure.
abs/labs don't read global memory.

Make GCC 9 happier.

diffstat:

 include/stdlib.h |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 0cae97421519 -r cf2ad7d3f75b include/stdlib.h
--- a/include/stdlib.h  Sat Jan 05 08:55:58 2019 +0000
+++ b/include/stdlib.h  Sat Jan 05 09:16:46 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: stdlib.h,v 1.120 2018/08/15 10:21:42 martin Exp $      */
+/*     $NetBSD: stdlib.h,v 1.121 2019/01/05 09:16:46 maya Exp $        */
 
 /*-
  * Copyright (c) 1990, 1993
@@ -95,7 +95,7 @@
 __BEGIN_DECLS
 __dead  void _Exit(int);
 __dead  void abort(void);
-__pure  int abs(int);
+__constfunc    int abs(int);
 int     atexit(void (*)(void));
 double  atof(const char *);
 int     atoi(const char *);
@@ -111,7 +111,7 @@
 __dead  void exit(int);
 void    free(void *);
 __aconst char *getenv(const char *);
-__pure long
+__constfunc long
         labs(long);
 ldiv_t  ldiv(long, long);
 void   *malloc(size_t);



Home | Main Index | Thread Index | Old Index