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


Mike Stump wrote:
Is there any valid spelling for:

int regexec(int [] restrict);

that involves using [] and not *?

In spirit it almost seemed like there should be, but I don't see the latitude in n843.
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])

nathan


-- Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery LLC nathan@codesourcery.com :: http://www.planetfall.pwp.blueyonder.co.uk



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