regen/warnings.pl: Add comments
authorKarl Williamson <public@khwilliamson.com>
Wed, 1 Jan 2014 04:57:53 +0000 (21:57 -0700)
committerKarl Williamson <public@khwilliamson.com>
Wed, 1 Jan 2014 20:49:24 +0000 (13:49 -0700)
These note that warnings categories should be independent in the calls
to ckWARN() and packWARN() type macros.

regen/warnings.pl
warnings.h

index acca0d0..e8dcf4a 100644 (file)
@@ -354,6 +354,10 @@ print $warn <<'EOM';
                                             char))
 
 #define ckWARN(w)              Perl_ckwarn(aTHX_ packWARN(w))
+
+/* The w1, w2 ... should be independent warnings categories; one shouldn't be
+ * a subcategory of any other */
+
 #define ckWARN2(w1,w2)         Perl_ckwarn(aTHX_ packWARN2(w1,w2))
 #define ckWARN3(w1,w2,w3)      Perl_ckwarn(aTHX_ packWARN3(w1,w2,w3))
 #define ckWARN4(w1,w2,w3,w4)   Perl_ckwarn(aTHX_ packWARN4(w1,w2,w3,w4))
@@ -366,6 +370,10 @@ print $warn <<'EOM';
 #define WARNshift              8
 
 #define packWARN(a)            (a                                      )
+
+/* The a, b, ... should be independent warnings categories; one shouldn't be
+ * a subcategory of any other */
+
 #define packWARN2(a,b)         ((a) | ((b)<<8)                         )
 #define packWARN3(a,b,c)       ((a) | ((b)<<8) | ((c)<<16)             )
 #define packWARN4(a,b,c,d)     ((a) | ((b)<<8) | ((c)<<16) | ((d) <<24))
index 7455a6c..929b94f 100644 (file)
                                             char))
 
 #define ckWARN(w)              Perl_ckwarn(aTHX_ packWARN(w))
+
+/* The w1, w2 ... should be independent warnings categories; one shouldn't be
+ * a subcategory of any other */
+
 #define ckWARN2(w1,w2)         Perl_ckwarn(aTHX_ packWARN2(w1,w2))
 #define ckWARN3(w1,w2,w3)      Perl_ckwarn(aTHX_ packWARN3(w1,w2,w3))
 #define ckWARN4(w1,w2,w3,w4)   Perl_ckwarn(aTHX_ packWARN4(w1,w2,w3,w4))
 #define WARNshift              8
 
 #define packWARN(a)            (a                                      )
+
+/* The a, b, ... should be independent warnings categories; one shouldn't be
+ * a subcategory of any other */
+
 #define packWARN2(a,b)         ((a) | ((b)<<8)                         )
 #define packWARN3(a,b,c)       ((a) | ((b)<<8) | ((c)<<16)             )
 #define packWARN4(a,b,c,d)     ((a) | ((b)<<8) | ((c)<<16) | ((d) <<24))