regcomp.c contains code that elicits uninitialized-variable warnings with GCC 4. The problem is that GCC isn't smart enough to see that when duplicate_node returns REG_ESPACE, the uninitialized storage is not used. I'll attach a straightforward patch that changes the signature of duplicate_node to avoid the warnings. My impression is that the patch also causes GCC to generate better code, but I haven't measured this.
Created attachment 595 [details] regcomp.c patch to avoid use of variables GCC 4 thinks are uninitialized
Applied to trunk.