From: Marcus Holland-Moritz Date: Fri, 26 Dec 2003 02:47:09 +0000 (+0100) Subject: Re: GCC bug breaking Perl_sv_catpvfn()? X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b10c0dbab60b31b4c602610ca5510452f9d75c3c;p=p5sagit%2Fp5-mst-13.2.git Re: GCC bug breaking Perl_sv_catpvfn()? From: "Marcus Holland-Moritz" Message-ID: <03ca01c3cb52$2d509b40$5700a8c0@R2D2> p4raw-id: //depot/perl@21962 --- diff --git a/sv.c b/sv.c index 05deb5a..7eba778 100644 --- a/sv.c +++ b/sv.c @@ -9052,23 +9052,23 @@ Perl_sv_vcatpvfn(pTHX_ SV *sv, const char *pat, STRLEN patlen, va_list *args, SV else if (args) { switch (intsize) { case 'h': iv = (short)va_arg(*args, int); break; - default: iv = va_arg(*args, int); break; case 'l': iv = va_arg(*args, long); break; case 'V': iv = va_arg(*args, IV); break; + default: iv = va_arg(*args, int); break; #ifdef HAS_QUAD case 'q': iv = va_arg(*args, Quad_t); break; #endif } } else { - iv = SvIVx(argsv); + IV tiv = SvIVx(argsv); /* work around GCC bug #13488 */ switch (intsize) { - case 'h': iv = (short)iv; break; - default: break; - case 'l': iv = (long)iv; break; - case 'V': break; + case 'h': iv = (short)tiv; break; + case 'l': iv = (long)tiv; break; + case 'V': + default: iv = tiv; break; #ifdef HAS_QUAD - case 'q': iv = (Quad_t)iv; break; + case 'q': iv = (Quad_t)tiv; break; #endif } } @@ -9136,23 +9136,23 @@ Perl_sv_vcatpvfn(pTHX_ SV *sv, const char *pat, STRLEN patlen, va_list *args, SV else if (args) { switch (intsize) { case 'h': uv = (unsigned short)va_arg(*args, unsigned); break; - default: uv = va_arg(*args, unsigned); break; case 'l': uv = va_arg(*args, unsigned long); break; case 'V': uv = va_arg(*args, UV); break; + default: uv = va_arg(*args, unsigned); break; #ifdef HAS_QUAD case 'q': uv = va_arg(*args, Quad_t); break; #endif } } else { - uv = SvUVx(argsv); + UV tuv = SvUVx(argsv); /* work around GCC bug #13488 */ switch (intsize) { - case 'h': uv = (unsigned short)uv; break; - default: break; - case 'l': uv = (unsigned long)uv; break; - case 'V': break; + case 'h': uv = (unsigned short)tuv; break; + case 'l': uv = (unsigned long)tuv; break; + case 'V': + default: uv = tuv; break; #ifdef HAS_QUAD - case 'q': uv = (Quad_t)uv; break; + case 'q': uv = (Uquad_t)tuv; break; #endif } }