This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] fix #19444 - build failures with -O1 due to -Wmaybe-uninitialized
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Joseph Myers <joseph at codesourcery dot com>
- Cc: Martin Sebor <msebor at gmail dot com>, GNU C Library <libc-alpha at sourceware dot org>
- Date: Thu, 14 Jan 2016 10:59:33 -0800
- Subject: Re: [PATCH] fix #19444 - build failures with -O1 due to -Wmaybe-uninitialized
- Authentication-results: sourceware.org; auth=none
- References: <56968319 dot 3070802 at gmail dot com> <alpine dot DEB dot 2 dot 10 dot 1601131740310 dot 17296 at digraph dot polyomino dot org dot uk> <CAMe9rOpBfq9q2X3+7GKe4APKuR6zPnzxDqsv86_aLAw+uN+vhg at mail dot gmail dot com> <alpine dot DEB dot 2 dot 10 dot 1601131756510 dot 17296 at digraph dot polyomino dot org dot uk> <CAMe9rOoHDQCOjs9HT-6fo5ayrLd-4d7VuyZa9xJMJkza9kE5Jg at mail dot gmail dot com> <alpine dot DEB dot 2 dot 10 dot 1601141802590 dot 9114 at digraph dot polyomino dot org dot uk> <CAMe9rOr4k5StujVk2vA8HyErJtrhoFvckrT9TtL=nxro4JdKFQ at mail dot gmail dot com> <alpine dot DEB dot 2 dot 10 dot 1601141845020 dot 9114 at digraph dot polyomino dot org dot uk>
On Thu, Jan 14, 2016 at 10:49 AM, Joseph Myers <joseph@codesourcery.com> wrote:
> On Thu, 14 Jan 2016, H.J. Lu wrote:
>
>> This is the right direction, but may not work with -Os. I am working
>> on a patch to add bits/string-1.h to define _STRING_ARCH_unaligned,
>> which is included unconditionally.
>
> Suppose you apply all Wilco's patches related to string inlines (including
> those that remove many of them from bits/string2.h). Are there any
His patch can't be applied since it contains odd characters.
> remaining references to _STRING_ARCH_unaligned in installed headers other
> than the definition?
>
> If so, what are they? If not, it should be moved out of installed headers
> as I said (and bits/ is a namespace exclusively for installed headers).
crypt/md5.c:#if !_STRING_ARCH_unaligned
crypt/sha256.c:#if _STRING_ARCH_unaligned
crypt/sha256.c:#if !_STRING_ARCH_unaligned
crypt/sha512.c:#if !_STRING_ARCH_unaligned
iconv/gconv_simple.c:#if !_STRING_ARCH_unaligned
iconv/gconv_simple.c:#if !_STRING_ARCH_unaligned
iconv/gconv_simple.c:#if !_STRING_ARCH_unaligned
iconv/gconv_simple.c:#if !_STRING_ARCH_unaligned
iconv/loop.c:#if _STRING_ARCH_unaligned || !defined DEFINE_UNALIGNED
iconv/loop.c:#if !defined DEFINE_UNALIGNED && !_STRING_ARCH_unaligned \
iconv/skeleton.c:#if _STRING_ARCH_unaligned
iconv/skeleton.c: (!_STRING_ARCH_unaligned \
include/arpa/nameser.h:#if _STRING_ARCH_unaligned
nscd/nscd_gethst_r.c:#if !_STRING_ARCH_unaligned
nscd/nscd_getserv_r.c:#if !_STRING_ARCH_unaligned
nscd/nscd_helper.c:#if !_STRING_ARCH_unaligned
nscd/nscd_helper.c:#if !_STRING_ARCH_unaligned
nscd/nscd_helper.c:#if !_STRING_ARCH_unaligned
resolv/res_send.c:#if _STRING_ARCH_unaligned
resolv/res_send.c:#if _STRING_ARCH_unaligned
stdlib/getenv.c:#if __BYTE_ORDER == __LITTLE_ENDIAN || !_STRING_ARCH_unaligned
stdlib/getenv.c:#if _STRING_ARCH_unaligned
stdlib/getenv.c:#if _STRING_ARCH_unaligned
stdlib/getenv.c:#if _STRING_ARCH_unaligned
> Installed headers should not define things only relevant for building
> glibc, or contain _LIBC conditionals, except where we don't have a cleaner
> alternative for how to avoid internals creeping into installed headers.
> The first preference should be that internal things go in internal headers
> (which includes the include/ wrappers, though arguably those should be
> slimmed down as well with more internal interfaces going in separate
> internal headers that are explicitly included, not in a header with the
> same name as one that gets installed).
>
> --
> Joseph S. Myers
> joseph@codesourcery.com
--
H.J.