On Wed, Aug 27, 2008 at 11:47 AM, Jay <[EMAIL PROTECTED]> wrote:
>
>> "(volatile*)
>
> So this is using implied int then?
> Isn't that really considered to be avoided these days? Or perfectly ok in C?
> I know it is "legal", but I assume to be avoided as a matter of taste and C++
> compat.
> Or yo
> "(volatile*)
So this is using implied int then?
Isn't that really considered to be avoided these days? Or perfectly ok in C?
I know it is "legal", but I assume to be avoided as a matter of taste and C++
compat.
Or you can really omit the type I think not. Might be a nice extension
though
On Wed, Aug 27, 2008 at 02:45:25PM +0100, Dave Korn wrote:
> Jay wrote on 27 August 2008 09:55:
>
> > Yeah that's probably ok.
> > Volatile is enough to force the ordering?
>
> Absolutely; it's a defined part of the standard that all volatile
> side-effects must complete in-order. GCC will not
Andrew Thomas Pinski wrote:
On Aug 27, 2008, at 0:27, Jay <[EMAIL PROTECTED]> wrote:
size = getpagesize(); \
mask = ~((long) size - 1);
Or even better store size after the store to mask.
That is:
int tmp = getpagesize();
*(volatile*)&mask = ~((long)tm
Jay wrote on 27 August 2008 09:55:
> Yeah that's probably ok.
> Volatile is enough to force the ordering?
Absolutely; it's a defined part of the standard that all volatile
side-effects must complete in-order. GCC will not move code past a volatile
operation.
> I still like just not caching ma
Yeah that's probably ok.
Volatile is enough to force the ordering?
I still like just not caching mask.
Is "volatile*" legal or just pseudo?
Some platforms cache neither.
Are some platforms getpagesize slow and others fast?
Or it's just "random evolution"?
If it's just "random", and nobody knows g
Sent from my iPhone
On Aug 27, 2008, at 0:27, Jay <[EMAIL PROTECTED]> wrote:
gcc 4.3.1
config/darwin.h:
#define
ENABLE_EXECUTE_STACK\
extern void __enable_execute_stack (void
*);\
void
gcc 4.3.1
config/darwin.h:
#define ENABLE_EXECUTE_STACK\
extern void __enable_execute_stack (void *);\
void\
__enable_execute_s