The source breaks function inlining limits, as we invalidly jump into a binding contour. The attached patch fixes this. (NB: This is probably due for a complete rewrite upstream as it's horrible!) Reproducible: Always Steps to Reproduce:
Created attachment 30214 [details, diff] Patch to fix compilation error Note that this is not the same patch as is currently found in portage - this is in addition.
iputils emerges fine here with 3.4.0 what are your CFLAGS ?
The problem is the following flag: "-finline-limit=xxxx" where xxxx is an integer between 100 and 10000 (I think). Whilst it is true that removing this flag allows compilation without the above patch, the code is still broken, and this will not compile using GCC 3.5.x (i.e. mainline) with no CFLAGS at all without this patch, and will probably not compile with GCC 3.4.1 when it's released, as the fact that this doesn't break without -finline-limit has been reported as a bug upstream and should be fixed in time for that. Jumping out of loops to labels in such a fashion as occurs here is no longer conformant behaviour.
'no longer conformant behaviour' ... is that per some ISO standard ? if so i have no problem adding the patch but otherwise, the code (while ugly), does not look 'wrong' :)
I think that if I search REALLY hard, I might be able to find the reference from the GCC mailing list, but I don't have time, I'm afraid... It was something about jumping out of a loop to a label under certain conditions. As far as I can tell, this contravenes one of those conditions...
http://gcc.gnu.org/ml/gcc-patches/2002-08/msg00432.html Well, I didn't have time before, but I do now... I *think* this patch has only picked this up now because of the new function inlining code. Check out the testsuite function.
added to cvs, thanks for the patch