Revision: 3199 Author: eliot Date: 2014-12-30 12:24:52 -0800 (Tue, 30 Dec 2014) Log Message: ----------- Correct the volatile decls. C makes the rules, not me.
Modified Paths: -------------- branches/Cog/platforms/Mac OS/plugins/SqueakFFIPrims/x86-sysv-MacIntel.c branches/Cog/platforms/Mac OS/vm/sqMacMain.c branches/Cog/platforms/unix/vm/sqUnixMain.c branches/Cog/platforms/win32/vm/sqWin32Main.c
Property Changed: ---------------- branches/Cog/platforms/Cross/vm/sqSCCSVersion.h
Property changes on: branches/Cog/platforms/Cross/vm/sqSCCSVersion.h ___________________________________________________________________ Modified: checkindate - Tue Dec 30 11:42:09 PST 2014 + Tue Dec 30 12:23:14 PST 2014
Modified: branches/Cog/platforms/Mac OS/plugins/SqueakFFIPrims/x86-sysv-MacIntel.c =================================================================== --- branches/Cog/platforms/Mac OS/plugins/SqueakFFIPrims/x86-sysv-MacIntel.c 2014-12-30 20:22:03 UTC (rev 3198) +++ branches/Cog/platforms/Mac OS/plugins/SqueakFFIPrims/x86-sysv-MacIntel.c 2014-12-30 20:24:52 UTC (rev 3199) @@ -77,7 +77,7 @@ volatile int ffiIntReturnValue; volatile int ffiLongReturnValue; volatile double ffiFloatReturnValue; -volatile int *ffiStructReturnValue; +int * volatile ffiStructReturnValue;
extern int ffiCallAddressOf(void *addr, void *stack, int size);
Modified: branches/Cog/platforms/Mac OS/vm/sqMacMain.c =================================================================== --- branches/Cog/platforms/Mac OS/vm/sqMacMain.c 2014-12-30 20:22:03 UTC (rev 3198) +++ branches/Cog/platforms/Mac OS/vm/sqMacMain.c 2014-12-30 20:24:52 UTC (rev 3199) @@ -1133,7 +1133,7 @@ #if !defined(min) # define min(x,y) (((x)>(y))?(y):(x)) #endif -static volatile char *p = 0; +static char * volatile p = 0;
static void sighandler(int sig) { p = (char *)&sig; }
Modified: branches/Cog/platforms/unix/vm/sqUnixMain.c =================================================================== --- branches/Cog/platforms/unix/vm/sqUnixMain.c 2014-12-30 20:22:03 UTC (rev 3198) +++ branches/Cog/platforms/unix/vm/sqUnixMain.c 2014-12-30 20:24:52 UTC (rev 3199) @@ -2113,7 +2113,7 @@ #if !defined(min) # define min(x,y) (((x)>(y))?(y):(x)) #endif -static volatile char *p = 0; +static char * volatile p = 0;
static void sighandler(int sig) { p = (char *)&sig; }
Modified: branches/Cog/platforms/win32/vm/sqWin32Main.c =================================================================== --- branches/Cog/platforms/win32/vm/sqWin32Main.c 2014-12-30 20:22:03 UTC (rev 3198) +++ branches/Cog/platforms/win32/vm/sqWin32Main.c 2014-12-30 20:24:52 UTC (rev 3199) @@ -1986,7 +1986,7 @@ #if !defined(min) # define min(x,y) (((x)>(y))?(y):(x)) #endif -static volatile char *p = 0; +static char * volatile p = 0;
static void sighandler(int sig) { p = (char *)&sig; }
On 30-12-2014, at 12:24 PM, commits@squeakvm.org wrote:
Revision: 3199 Author: eliot Date: 2014-12-30 12:24:52 -0800 (Tue, 30 Dec 2014) Log Message:
Correct the volatile decls. C makes the rules, not me.
Don’tcha just hate it when reality conflicts with what should be?
tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Useful random insult:- Doesn't just know nothing; doesn't even suspect much.
My neurons never connected the syntax until some colleague taught me the rule for const qualifier: You have to read declaration from right to left
int * const x -> x is a constant pointer to an int int const * x -> x is a pointer to a constant int.
Same for any other volatile, chicken, goose...
2014-12-30 22:48 GMT+01:00 tim Rowledge tim@rowledge.org:
On 30-12-2014, at 12:24 PM, commits@squeakvm.org wrote:
Revision: 3199 Author: eliot Date: 2014-12-30 12:24:52 -0800 (Tue, 30 Dec 2014) Log Message:
Correct the volatile decls. C makes the rules, not me.
Don’tcha just hate it when reality conflicts with what should be?
tim
tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Useful random insult:- Doesn't just know nothing; doesn't even suspect much.
vm-dev@lists.squeakfoundation.org