This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Upstreaming the glibc Hurd port


On Tue, Apr 3, 2018 at 5:58 PM, Samuel Thibault <samuel.thibault@gnu.org> wrote:
> Joseph Myers, on mar. 03 avril 2018 21:48:32 +0000, wrote:
>> The build for i686-gnu also fails using GCC 6 branch with
>> build-many-glibcs.py:
>>
>> hurdsig.c: In function 'interrupted_reply_port_location.isra.1':
>> hurdsig.c:250:39: error: 'portloc' may be used uninitialized in this function [-Werror=maybe-uninitialized]
>>    *(volatile mach_port_t *) portloc = *portloc;
>>                                        ^~~~~~~~
>>
>> I haven't investigated whether this warning is valid, or whether it's
>> bogus
>
> Well, it's completely bogus: portloc is initialized just above. I don't
> understand why it wouldn't see that.

I think it thinks the *value pointed-to by portloc* is uninitialized.
Writing that value to a volatile memory location (which happens to be
the same memory location, but you specifically told it not to pay
attention to that with the volatile cast) is therefore invalid.

I don't know this code well enough to suggest what you might could do
about that.  Since the warning does not happen with GCC 7 or 8 I would
be fine with suppressing the diagnostic.

zw


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]