This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/68831] New: [6 Regression] Superfluous -Waddress warning for C++ delete
- From: "trippels at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 10 Dec 2015 11:03:39 +0000
- Subject: [Bug c++/68831] New: [6 Regression] Superfluous -Waddress warning for C++ delete
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68831
Bug ID: 68831
Summary: [6 Regression] Superfluous -Waddress warning for C++
delete
Product: gcc
Version: 6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: trippels at gcc dot gnu.org
CC: ppalka at gcc dot gnu.org
Target Milestone: ---
Since r224455 the compiler issues a bogus warning for the following testcase:
% cat AsmPrinter.ii
class DenseMap {
public:
~DenseMap();
};
const DenseMap &GCMap{};
void foo() { delete &GCMap; }
% g++ -std=c++14 -Waddress -c AsmPrinter.ii
AsmPrinter.ii: In function âvoid foo()â:
AsmPrinter.ii:6:22: warning: the compiler can assume that the address of
âGCMapâ will never be NULL [-Waddress]
void foo() { delete &GCMap; }
^~~~~