bug-gnulib
[Top][All Lists]
Advanced

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

Re: string.h uses restrict


From: Eric Blake
Subject: Re: string.h uses restrict
Date: Wed, 18 Mar 2009 20:09:03 -0600
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.19) Gecko/20081209 Thunderbird/2.0.0.19 Mnenhy/0.7.6.666

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

According to Reuben Thomas on 3/18/2009 7:50 PM:
> string.h uses restrict, which doesn't work if the compiler is C89 (e.g.
> gcc in -std=c89 mode).
> 
> regex.h has some code to detect this case and allow for it; should
> string.h copy this code? Or should it be broken out into a module? (It
> would be useful to gnulib users too.)

The code is AC_C_RESTRICT; and since it is provided by autoconf, a gnulib
module just for restrict isn't really needed.  However, string.in.h only
uses restrict within: mempcpy, stpcpy, stpncpy, strsep, and strtok_r, all
of which, in the respective m4/*.m4 file, made a point to require
AC_C_RESTRICT.  Therefore, I can't see any bug where gnulib uses restrict
inappropriately with my glance through the code base.

Did you actually encounter a compilation failure where restrict was
improperly defined while using gnulib?  If so, how do we reproduce it?

- --
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

iEYEARECAAYFAknBqT8ACgkQ84KuGfSFAYDN2ACgrU0o7afzUjwvHiuUSmHLuXjU
TcMAoNNUo5CQvDiZmWgZ3l3wYy6DIreI
=hegg
-----END PGP SIGNATURE-----




reply via email to

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