Silence gcc-8 warnings
Alan Modra
amodra@gmail.com
Mon Apr 23 16:11:00 GMT 2018
On Tue, Apr 24, 2018 at 12:41:31AM +0930, Alan Modra wrote:
> Yeah, really curious. I failed to mention that gcc build was on
> hppa-linux, whereas the one that didn't show any error was on
> x86_64-linux. I have a little sleuthing to do to figure out what made
> the difference. It doesn't seem likely that it was any of the more
> recent gcc patches.
Oh wow, I don't see the first error on x86_64-linux (for
swap_linux_prpsinfo32_ugid32_out) when the preprocessed source looks
like the following. However, take out the file/line directives and
the problem appears!
static inline void
swap_linux_prpsinfo32_ugid32_out
(bfd *obfd,
const struct elf_internal_linux_prpsinfo *from,
struct elf_external_linux_prpsinfo32_ugid32 *to)
{
((void) (*((unsigned char *) (&to->pr_state)) = (from->pr_state) & 0xff));
((void) (*((unsigned char *) (&to->pr_sname)) = (from->pr_sname) & 0xff));
((void) (*((unsigned char *) (&to->pr_zomb)) = (from->pr_zomb) & 0xff));
((void) (*((unsigned char *) (&to->pr_nice)) = (from->pr_nice) & 0xff));
((*((obfd)->xvec->bfd_putx32)) ((from->pr_flag),(to->pr_flag)));
((*((obfd)->xvec->bfd_putx32)) ((from->pr_uid),(to->pr_uid)));
((*((obfd)->xvec->bfd_putx32)) ((from->pr_gid),(to->pr_gid)));
((*((obfd)->xvec->bfd_putx32)) ((from->pr_pid),(to->pr_pid)));
((*((obfd)->xvec->bfd_putx32)) ((from->pr_ppid),(to->pr_ppid)));
((*((obfd)->xvec->bfd_putx32)) ((from->pr_pgrp),(to->pr_pgrp)));
((*((obfd)->xvec->bfd_putx32)) ((from->pr_sid),(to->pr_sid)));
# 72 "/home/alan/src/binutils-gdb/bfd/elf-linux-core.h" 3 4
__builtin_strncpy (
# 72 "/home/alan/src/binutils-gdb/bfd/elf-linux-core.h"
to->pr_fname
# 72 "/home/alan/src/binutils-gdb/bfd/elf-linux-core.h" 3 4
,
# 72 "/home/alan/src/binutils-gdb/bfd/elf-linux-core.h"
from->pr_fname
# 72 "/home/alan/src/binutils-gdb/bfd/elf-linux-core.h" 3 4
,
# 72 "/home/alan/src/binutils-gdb/bfd/elf-linux-core.h"
sizeof (to->pr_fname)
# 72 "/home/alan/src/binutils-gdb/bfd/elf-linux-core.h" 3 4
)
# 72 "/home/alan/src/binutils-gdb/bfd/elf-linux-core.h"
;
# 73 "/home/alan/src/binutils-gdb/bfd/elf-linux-core.h" 3 4
__builtin_strncpy (
# 73 "/home/alan/src/binutils-gdb/bfd/elf-linux-core.h"
to->pr_psargs
# 73 "/home/alan/src/binutils-gdb/bfd/elf-linux-core.h" 3 4
,
# 73 "/home/alan/src/binutils-gdb/bfd/elf-linux-core.h"
from->pr_psargs
# 73 "/home/alan/src/binutils-gdb/bfd/elf-linux-core.h" 3 4
,
# 73 "/home/alan/src/binutils-gdb/bfd/elf-linux-core.h"
sizeof (to->pr_psargs)
# 73 "/home/alan/src/binutils-gdb/bfd/elf-linux-core.h" 3 4
)
# 73 "/home/alan/src/binutils-gdb/bfd/elf-linux-core.h"
;
}
--
Alan Modra
Australia Development Lab, IBM
More information about the Binutils
mailing list