about summary refs log tree commit diff
path: root/libio/libio.h
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2019-11-03 11:39:56 +0100
committerFlorian Weimer <fweimer@redhat.com>2019-11-13 18:18:51 +0100
commit70c6e15654928c603c6d24bd01cf62e7a8e2ce9b (patch)
tree672e377b91c9fc15f00a15d82cd3f0a2f55fba90 /libio/libio.h
parent15740788d79447d863b88a5434f09d488d4088d3 (diff)
downloadglibc-70c6e15654928c603c6d24bd01cf62e7a8e2ce9b.tar.gz
glibc-70c6e15654928c603c6d24bd01cf62e7a8e2ce9b.tar.xz
glibc-70c6e15654928c603c6d24bd01cf62e7a8e2ce9b.zip
Redefine _IO_iconv_t to store a single gconv step pointer [BZ #25097]
libio can only deal with gconv conversions which consist of a single
step.  Not using __gconv_info simplifies the data structures somewhat.

This eliminates a new GCC 10 warning about subscribing an inner
zero-length array.

Tested on x86_64-linux-gnu with mainline GCC.  Built with
build-many-glibcs.py, also with mainline GCC.  Due to GCC PR 92039,
there are failures left on 32-bit architectures with float128 support.

Change-Id: I8b4c489b619a53154712ff32e1b6f13bb92d4203
Diffstat (limited to 'libio/libio.h')
-rw-r--r--libio/libio.h10
1 files changed, 3 insertions, 7 deletions
diff --git a/libio/libio.h b/libio/libio.h
index bed324e57d..3be2fe81f6 100644
--- a/libio/libio.h
+++ b/libio/libio.h
@@ -48,14 +48,10 @@
 #include <bits/types/wint_t.h>
 #include <gconv.h>
 
-typedef union
+typedef struct
 {
-  struct __gconv_info __cd;
-  struct
-  {
-    struct __gconv_info __cd;
-    struct __gconv_step_data __data;
-  } __combined;
+  struct __gconv_step *step;
+  struct __gconv_step_data step_data;
 } _IO_iconv_t;
 
 #include <shlib-compat.h>