Change 33611 by [EMAIL PROTECTED] on 2008/03/31 12:32:56

        Integrate:
        [ 33085]
        Subject: FW: [PATCH] RE: [PATCH] volatile, avoid clobbered
        From: "Robin Barker" <[EMAIL PROTECTED]>
        Date: Wed, 23 Jan 2008 18:51:24 -0000
        Message-ID: <[EMAIL PROTECTED]>
        
        [ 33106]
        Fix Win32 compiler warnings introduced by #33081 and #33085
        
        [just the 33081 part]
        
        [ 33152]
        Subject: [PATCH] don't forbid brace groups with g++ 4.2.2
        From: "Robin Barker" <[EMAIL PROTECTED]>
        Date: Wed, 30 Jan 2008 18:42:25 -0000
        Message-ID: <[EMAIL PROTECTED]>
        
        [ 33368]
        Two break; statements that aren't (yet) needed, but may trip someone up
        in the future.

Affected files ...

... //depot/maint-5.10/perl/embed.fnc#9 integrate
... //depot/maint-5.10/perl/op.c#6 integrate
... //depot/maint-5.10/perl/perl.c#6 integrate
... //depot/maint-5.10/perl/perl.h#9 integrate
... //depot/maint-5.10/perl/pod/perlapi.pod#5 integrate
... //depot/maint-5.10/perl/proto.h#7 integrate

Differences ...

==== //depot/maint-5.10/perl/embed.fnc#9 (text) ====
Index: perl/embed.fnc
--- perl/embed.fnc#8~33167~     2008-02-01 06:04:12.000000000 -0800
+++ perl/embed.fnc      2008-03-31 05:32:56.000000000 -0700
@@ -646,7 +646,7 @@
 Apd    |I32    |call_argv      |NN const char* sub_name|I32 flags|NN char** 
argv
 Apd    |I32    |call_method    |NN const char* methname|I32 flags
 Apd    |I32    |call_pv        |NN const char* sub_name|I32 flags
-Apd    |I32    |call_sv        |NN SV* sv|I32 flags
+Apd    |I32    |call_sv        |NN SV* sv|VOL I32 flags
 Ap     |void   |despatch_signals
 Ap     |OP *   |doref          |NN OP *o|I32 type|bool set_op_ref
 Apd    |SV*    |eval_pv        |NN const char* p|I32 croak_on_error

==== //depot/maint-5.10/perl/op.c#6 (text) ====
Index: perl/op.c
--- perl/op.c#5~33141~  2008-01-30 15:50:34.000000000 -0800
+++ perl/op.c   2008-03-31 05:32:56.000000000 -0700
@@ -870,6 +870,7 @@
     case OP_SORT:
        if (ckWARN(WARN_VOID))
            Perl_warner(aTHX_ packWARN(WARN_VOID), "Useless use of sort in 
scalar context");
+       break;
     }
     return o;
 }
@@ -2339,7 +2340,7 @@
 Perl_fold_constants(pTHX_ register OP *o)
 {
     dVAR;
-    register OP *curop;
+    register OP * VOL curop;
     OP *newop;
     VOL I32 type = o->op_type;
     SV * VOL sv = NULL;
@@ -2384,6 +2385,7 @@
        /* XXX what about the numeric ops? */
        if (PL_hints & HINT_LOCALE)
            goto nope;
+       break;
     }
 
     if (PL_parser && PL_parser->error_count)

==== //depot/maint-5.10/perl/perl.c#6 (text) ====
Index: perl/perl.c
--- perl/perl.c#5~33166~        2008-02-01 04:52:40.000000000 -0800
+++ perl/perl.c 2008-03-31 05:32:56.000000000 -0700
@@ -2581,7 +2581,7 @@
 */
 
 I32
-Perl_call_sv(pTHX_ SV *sv, I32 flags)
+Perl_call_sv(pTHX_ SV *sv, VOL I32 flags)
                        /* See G_* flags in cop.h */
 {
     dVAR; dSP;

==== //depot/maint-5.10/perl/perl.h#9 (text) ====
Index: perl/perl.h
--- perl/perl.h#8~33590~        2008-03-28 12:01:33.000000000 -0700
+++ perl/perl.h 2008-03-31 05:32:56.000000000 -0700
@@ -452,8 +452,12 @@
 
 /* gcc (-ansi) -pedantic doesn't allow gcc statement expressions,
  * g++ allows them but seems to have problems with them
- * (insane errors ensue). */
-#if defined(PERL_GCC_PEDANTIC) || (defined(__GNUC__) && defined(__cplusplus))
+ * (insane errors ensue).
+ * g++ does not give insane errors now (RMB 2008-01-30, gcc 4.2.2).
+ */
+#if defined(PERL_GCC_PEDANTIC) || \
+    (defined(__GNUC__) && defined(__cplusplus) && \
+       ((__GNUC__ < 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ < 2))))
 #  ifndef PERL_GCC_BRACE_GROUPS_FORBIDDEN
 #    define PERL_GCC_BRACE_GROUPS_FORBIDDEN
 #  endif
@@ -528,11 +532,7 @@
 #endif
 
 #if defined(HASVOLATILE) || defined(STANDARD_C)
-#   ifdef __cplusplus
-#      define VOL              /* to temporarily suppress warnings */
-#   else
 #      define VOL volatile
-#   endif
 #else
 #   define VOL
 #endif

==== //depot/maint-5.10/perl/pod/perlapi.pod#5 (text+w) ====
Index: perl/pod/perlapi.pod
--- perl/pod/perlapi.pod#4~33610~       2008-03-30 16:20:46.000000000 -0700
+++ perl/pod/perlapi.pod        2008-03-31 05:32:56.000000000 -0700
@@ -428,7 +428,7 @@
 
 NOTE: the perl_ form of this function is deprecated.
 
-       I32     call_sv(SV* sv, I32 flags)
+       I32     call_sv(SV* sv, VOL I32 flags)
 
 =for hackers
 Found in file perl.c

==== //depot/maint-5.10/perl/proto.h#7 (text+w) ====
Index: perl/proto.h
--- perl/proto.h#6~33167~       2008-02-01 06:04:12.000000000 -0800
+++ perl/proto.h        2008-03-31 05:32:56.000000000 -0700
@@ -1773,7 +1773,7 @@
 PERL_CALLCONV I32      Perl_call_pv(pTHX_ const char* sub_name, I32 flags)
                        __attribute__nonnull__(pTHX_1);
 
-PERL_CALLCONV I32      Perl_call_sv(pTHX_ SV* sv, I32 flags)
+PERL_CALLCONV I32      Perl_call_sv(pTHX_ SV* sv, VOL I32 flags)
                        __attribute__nonnull__(pTHX_1);
 
 PERL_CALLCONV void     Perl_despatch_signals(pTHX);
End of Patch.

Reply via email to