Re: [PATCH] Use opaque struct rather than char * in regex.h

2012-04-04 Thread Paul Eggert
On 04/03/2012 09:34 PM, Jim Meyering wrote: > The alternative (your patch or similar) would move the definition > of re_dfa_t from its private header to a public one. We needn't expose the typedef, just the struct tag for an incomplete type; this doesn't reveal anything other than the struct tag,

Re: [PATCH] Use opaque struct rather than char * in regex.h

2012-04-03 Thread Jim Meyering
Vladimir 'φ-coder/phcoder' Serbinenko wrote: > Hello, all. It's a common problem when program attempts to access > unaligned pointer. On x86 this usually goes unnoticed but on other CPUs > it results in segmentation fault. -Wcast-align is a good way to check > that no such problem occurs. Unfortuna

[PATCH] Use opaque struct rather than char * in regex.h

2012-04-03 Thread Vladimir 'φ-coder/phcoder' Serbinenko
Hello, all. It's a common problem when program attempts to access unaligned pointer. On x86 this usually goes unnoticed but on other CPUs it results in segmentation fault. -Wcast-align is a good way to check that no such problem occurs. Unfortunately regex module breaks the invariants by casting ch