`restrict' qualifer

From: Vijay Kumar R Zanvar (vijaykumar.rz_at_globaledgesoft.com)
Date: 04/27/04


Date: Tue, 27 Apr 2004 12:23:52 +0530

Greetings,

Are the following inferences of mine correct?

1. #include <string.h>
    char *strcpy(char * restrict s1,
        const char * restrict s2);

    a. s1 != s2
    b. That means,

            char s[10] = "vijoeyz";
            (void) strcpy ( s, s ); /* though useless */

        is not allowed!

2. #include <string.h>
    size_t strlen(const char *s);

    a. If there is only one parameter of type "pointer to T", for any type
        T, then the `restrict' qualifier need not be used.

--
Women and cats do as they please.  Men and dogs
should sit back, and learn to relax.