This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: restrict in c99


On Fri, 6 Feb 2004, Nathan Sidwell wrote:

> int regexec(int [restrict])
> 
> C99 6.7.5.2 says words to the effect of 'static, restrict, const and
> volatile can appear inside the outermost[] of an array parameter'
> 
> the qualifiers are applied to the decayed pointer type and static can be
> used to mean 'at least this many elements' as in
> 	void foo (double a[static 10])

But at present in C99 you need a parameter name, as the syntax for
abstract declarators doesn't include these cases.  GCC allows this syntax
in type names only because I didn't notice the difference when
implementing it, and when the problem came up on the Austin Group list the
conclusion was to submit a DR (N1015/DR289,
<http://std.dkuug.dk/JTC1/SC22/WG14/www/docs/n1015.htm>; see also the Kona
minutes; the online DR log doesn't yet include this DR).

-- 
Joseph S. Myers
jsm@polyomino.org.uk


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]