This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
fix some signed/unsigned warnings
[perl5.git] / perl.h
diff --git a/perl.h b/perl.h
index 4a98718..05dbe0e 100644 (file)
--- a/perl.h
+++ b/perl.h
 #endif
 
 /*
- * STMT_START { statements; } STMT_END;
- * can be used as a single statement, as in
- * if (x) STMT_START { ... } STMT_END; else ...
- *
- * Trying to select a version that gives no warnings...
- */
+=head1 Miscellaneous Functions
+
+=for apidoc AmnUu|void|STMT_START
+
+ STMT_START { statements; } STMT_END;
+
+can be used as a single statement, as in
+
+ if (x) STMT_START { ... } STMT_END; else ...
+
+These are often used in macro definitions.  Note that you can't return a value
+out of them.
+
+=for apidoc AmnUhu|void|STMT_END
+
+=cut
+
+ Trying to select a version that gives no warnings...
+*/
 #if !(defined(STMT_START) && defined(STMT_END))
 # ifdef PERL_USE_GCC_BRACE_GROUPS
 #   define STMT_START  (void)( /* gcc supports "({ STATEMENTS; })" */
@@ -6232,7 +6245,7 @@ the plain locale pragma without a parameter (S<C<use locale>>) is in effect.
 #  if defined (PERL_CORE) || defined (PERL_IN_XSUB_RE)
 
      /* This internal macro should be called from places that operate under
-      * locale rules.  It there is a problem with the current locale that
+      * locale rules.  If there is a problem with the current locale that
       * hasn't been raised yet, it will output a warning this time.  Because
       * this will so rarely  be true, there is no point to optimize for time;
       * instead it makes sense to minimize space used and do all the work in
@@ -6556,7 +6569,7 @@ expression, but with an empty argument list, like this:
      ...
  }
 
-=for apidoc Am|void|WITH_LC_NUMERIC_SET_TO_NEEDED
+=for apidoc Am|void|WITH_LC_NUMERIC_SET_TO_NEEDED|block
 
 This macro invokes the supplied statement or block within the context
 of a L</STORE_LC_NUMERIC_SET_TO_NEEDED> .. L</RESTORE_LC_NUMERIC> pair
@@ -6579,7 +6592,7 @@ is equivalent to:
 #endif
   }
 
-=for apidoc Am|void|WITH_LC_NUMERIC_SET_TO_NEEDED_IN|bool in_lc_numeric
+=for apidoc Am|void|WITH_LC_NUMERIC_SET_TO_NEEDED_IN|bool in_lc_numeric|block
 
 Same as L</WITH_LC_NUMERIC_SET_TO_NEEDED> with in_lc_numeric provided
 as the precalculated value of C<IN_LC(LC_NUMERIC)>. It is the caller's
@@ -7192,9 +7205,19 @@ so no C<x++>.
 #  define do_aexec(really, mark,sp)    do_aexec5(really, mark, sp, 0, 0)
 #endif
 
-/* check embedded \0 characters in pathnames passed to syscalls,
-   but allow one ending \0 */
-#define IS_SAFE_SYSCALL(p, len, what, op_name) (S_is_safe_syscall(aTHX_ (p), (len), (what), (op_name)))
+
+/*
+=head1 Miscellaneous Functions
+
+=for apidoc Am|bool|IS_SAFE_SYSCALL|NN const char *pv|STRLEN len|NN const char *what|NN const char *op_name
+
+Same as L</is_safe_syscall>.
+
+=cut
+
+Allows one ending \0
+*/
+#define IS_SAFE_SYSCALL(p, len, what, op_name) (Perl_is_safe_syscall(aTHX_ (p), (len), (what), (op_name)))
 
 #define IS_SAFE_PATHNAME(p, len, op_name) IS_SAFE_SYSCALL((p), (len), "pathname", (op_name))
 
@@ -7460,6 +7483,7 @@ START_EXTERN_C
  */
 
 /* The quadmath literals are anon structs which -Wc++-compat doesn't like. */
+GCC_DIAG_IGNORE_DECL(-Wpragmas);
 GCC_DIAG_IGNORE_DECL(-Wc++-compat);
 
 #  ifdef USE_QUADMATH
@@ -7531,6 +7555,7 @@ INFNAN_NV_U8_DECL PL_nan = { 0.0/0.0 }; /* keep last */
 #  endif
 
 GCC_DIAG_RESTORE_DECL;
+GCC_DIAG_RESTORE_DECL;
 
 #else