[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug ld/29552] New: [GCC 12.2] the address of ‘elf_header’ will never be
From: |
hjl.tools at gmail dot com |
Subject: |
[Bug ld/29552] New: [GCC 12.2] the address of ‘elf_header’ will never be NULL [-Werror=address] |
Date: |
Tue, 06 Sep 2022 16:07:33 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=29552
Bug ID: 29552
Summary: [GCC 12.2] the address of ‘elf_header’ will never be
NULL [-Werror=address]
Product: binutils
Version: 2.40 (HEAD)
Status: NEW
Severity: normal
Priority: P2
Component: ld
Assignee: unassigned at sourceware dot org
Reporter: hjl.tools at gmail dot com
Target Milestone: ---
GCC 12.2 failed to build binutils master branch:
/export/gnu/import/git/sources/binutils-gdb/ld/ldelf.c: In function
‘ldelf_after_open’:
/export/gnu/import/git/sources/binutils-gdb/ld/ldelf.c:1049:43: error: the
comparison will always evaluate as ‘true’ for the address of ‘elf_header’ will
never be NULL [-Werror=address]
1049 | && elf_tdata (abfd)->elf_header != NULL
| ^~
In file included from
/export/gnu/import/git/sources/binutils-gdb/ld/ldelf.c:37:
/export/gnu/import/git/sources/binutils-gdb/ld/../bfd/elf-bfd.h:1930:21: note:
‘elf_header’ declared here
1930 | Elf_Internal_Ehdr elf_header[1]; /* Actual data, but ref like
ptr */
| ^~~~~~~~~~
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug ld/29552] New: [GCC 12.2] the address of ‘elf_header’ will never be NULL [-Werror=address],
hjl.tools at gmail dot com <=