Thanks, but your patch would make the resulting program fail to conform
to C89, as C89 requires array sizes to be constant expressions.

I'm still waiting to see if they will consider this as a compiler defect
and if an APAR will be created to eventually.
I'll let you and the mailing list know once I receive this answer.

It's pretty clear that the compiler fails to conform
to the C standard here (C89, C99, C11, whichever version you like),
as the size is an integer constant expression.

Does the following alternative patch work around the problem for you?
If so, I can install it, as it should work regardless of the C
standard version.

diff --git a/src/incremen.c b/src/incremen.c
index f6b311e..d850b68 100644
--- a/src/incremen.c
+++ b/src/incremen.c
@@ -1296,8 +1296,8 @@ void
 show_snapshot_field_ranges (void)
 {
   struct field_range const *p;
-  char minbuf[max (SYSINT_BUFSIZE, INT_BUFSIZE_BOUND (intmax_t))];
-  char maxbuf[max (SYSINT_BUFSIZE, INT_BUFSIZE_BOUND (uintmax_t))];
+  char minbuf[SYSINT_BUFSIZE];
+  char maxbuf[SYSINT_BUFSIZE];
printf("This tar's snapshot file field ranges are\n");
   printf ("   (%-15s => [ %s, %s ]):\n\n", "field name", "min", "max");
@@ -1406,7 +1406,7 @@ write_directory_file_entry (void *entry, void *data)
if (DIR_IS_FOUND (directory))
     {
-      char buf[max (SYSINT_BUFSIZE, INT_BUFSIZE_BOUND (intmax_t))];
+      char buf[SYSINT_BUFSIZE];
       char const *s;
s = DIR_IS_NFS (directory) ? "1" : "0";


Reply via email to