Re: C language dialect and optimization
Re: C language dialect and optimization
- Subject: Re: C language dialect and optimization
- From: "Andy O'Meara" <email@hidden>
- Date: Tue, 26 Dec 2006 13:16:29 -0500
As I understand it, the line in gcc w/ c99 on:
char* __restrict foo;
should be equivalent to the line in CW:
char* restrict foo;
Is this correct? I ask this because in one of my master headers,
I basically have:
#if __GNUC__
#define restrict __restrict
#endif
In other words, anyone know why when c99 is enabled in gcc why
usage of 'restrict' emits errors.
In C99 mode IIRC it should understand restrict directly.
Hmmm... in C99 mode, the following emits an error in gcc (but no
error in CW9):
void foo( char* restrict inPtr ) {
...
}
I'm guessing CW9 is forgiving on a compliance issue? Otherwise, how
does one communicate to the compiler for a ptr argument to be
'restrict'? I take it the answer is the unsightly approach:
void foo( char* inPtr ) {
char* restrict ptr2 = (char* restrict) inPtr;
...
}
Seems kind of annoying to do, no?
Thanks,
Andy
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden