[Top][All Lists]

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

glibc 2.2.5 support for restrict

From: madhvesh
Subject: glibc 2.2.5 support for restrict
Date: Fri, 21 Nov 2003 20:22:10 +0530


I am referring to glibc-2.2.5 and linxu kernel-2.4.20. I came across the
standard which says that "restrict" keyword has to be used for
function prototypes. Also i noticed that, the gcc compiler option
--std=c99 enables this support.

In glibc-v2.2.5, i came across following code which enables "__restirct" for
gcc compiler
versions less than 2.96.


#ifndef __restrict
#if ! (2 < __GNUC__ || (2 == __GNUC__ && 95 <= __GNUC_MINOR__))
#   if defined restrict || 199901L <= __STDC_VERSION__
#     define __restrict restrict
#  else
#     define __restrict
#   endif

So glibc-v2.2.5 will not support restrict pointer types for gcc versions
above 2.95?
To support this in glibc-v2.2.5 with linux-kernel2.4.20, what needs to be

Since some of the signals related function prototypes are to be supported
"restrict" keyword, how is it supported in NPTL as part of pthreads?

Also to support this at library level say glibc-v2.2.5, linux-kernel source
has to provide proper implementation for restrict pointers? I mean does it
take care
of not modifying the argument pointer types of restrict internally while
the user passed arguments?
Is this issue addressed in linux-kernel-v2.4.20?

Any help in this will be very helpful to me

Thanks in advance


reply via email to

[Prev in Thread] Current Thread [Next in Thread]