Commit 4a7ab1bf authored by Sergei Golubchik's avatar Sergei Golubchik

workaround for gcc 4.1.0 strict-aliasing bug

mysys/lf_alloc-pin.c:
  workaround for gcc 4.1.0 strict-aliasing bug.
  and yes, I mean a *bug* - as union (in alloc_free) is a
  documented way to access type-punned pointers. and it helps in
  newer gcc, but fails in 4.1.0
parent d18d5364
......@@ -320,7 +320,7 @@ static int match_pins(LF_PINS *el, void *addr)
#define available_stack_size(CUR,END) (long) ((char*)(END) - (char*)(CUR))
#endif
#define next_node(P, X) (*((uchar **)(((uchar *)(X)) + (P)->free_ptr_offset)))
#define next_node(P, X) (*((uchar * volatile *)(((uchar *)(X)) + (P)->free_ptr_offset)))
#define anext_node(X) next_node(&allocator->pinbox, (X))
/*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment