bug-gnulib
[Top][All Lists]
Advanced

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

Re: [PATCH] setsockopt: Add support for timeouts on W32


From: Eric Blake
Subject: Re: [PATCH] setsockopt: Add support for timeouts on W32
Date: Mon, 29 Dec 2008 06:04:44 -0700
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.18) Gecko/20081105 Thunderbird/2.0.0.18 Mnenhy/0.7.5.666

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Bruno Haible on 12/25/2008 5:35 PM:
> Regarding 'restrict',
> I never use this keyword because AFAIK, omitting it has no effect on
> correct programs; its presence is only a hint to the user that uses of
> the functions with daring overlap of argument locations are invalid,
> and in most cases a considerate programmer will not pass overlapping
> arguments to functions anyway. - Please correct me if I'm wrong.

As I understand it, you are correct that any program that compiles with
restrict present will also compile with restrict omitted.  You are also
correct that about the only category of bugs that the compiler can detect
and enforce when restrict is in place, namely those related to overlapping
memory, are the very bugs least likely to happen by considerate
programmers, so it won't catch much.  On the other hand, the use of
restrict can give the compiler hints so that it can better optimize code;
omitting restrict may thus be penalizing your resulting performance.
Therefore, I would claim that consistently using restrict is in our best
interest (although we have a lot of work before gnulib is marked up to use
it consistently).

- --
Don't work too hard, make some time for fun as well!

Eric Blake             address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAklYyuwACgkQ84KuGfSFAYBLSQCfcE1xI4KRwWGf8x6WZNUtAXGs
/QIAoKTwLrdgmt3KbB4pkaF3l6njHeUO
=e/gp
-----END PGP SIGNATURE-----




reply via email to

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