Branch: Tag:


2014-08-25 09:33:39 by Per Hedbor <>

Use __restrict with gcc on the pike_interpreter

This produces the same code as const, but avoids lying to the compiler.

Fixed an issue with gcc 3.4, which over-optimized a bit (specifically,
pip->stack_pointer was not re-read between function calls, which seems
odd given that it is not pip->stack_pointer that was const...)

862:   PMOD_EXPORT extern struct callback_list evaluator_callbacks;      PMOD_EXPORT extern struct Pike_interpreter_struct * - #ifndef IN_THREAD_CODE -  const + #if defined(__GNUC__) && __GNUC__ >= 3 +  __restrict   #endif    Pike_interpreter_pointer;   #define Pike_interpreter (*Pike_interpreter_pointer)