[Bug c++/98646] [11 Regression] A static_cast confuses -Wnonnull, causing false positives

2021-01-25 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98646 Martin Sebor changed: What|Removed |Added Resolution|--- |FIXED Status|ASSIGNED

[Bug c++/98646] [11 Regression] A static_cast confuses -Wnonnull, causing false positives

2021-01-25 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98646 --- Comment #14 from CVS Commits --- The master branch has been updated by Martin Sebor : https://gcc.gnu.org/g:d6f1cf644c45b76a27b6a6869dedaa030e3c7570 commit r11-6900-gd6f1cf644c45b76a27b6a6869dedaa030e3c7570 Author: Martin Sebor Date: Mon

[Bug c++/98646] [11 Regression] A static_cast confuses -Wnonnull, causing false positives

2021-01-20 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98646 Martin Sebor changed: What|Removed |Added Keywords||patch --- Comment #13 from Martin Sebor

[Bug c++/98646] [11 Regression] A static_cast confuses -Wnonnull, causing false positives

2021-01-20 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98646 Martin Sebor changed: What|Removed |Added Status|NEW |ASSIGNED Assignee|unassigned at

[Bug c++/98646] [11 Regression] A static_cast confuses -Wnonnull, causing false positives

2021-01-20 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98646 --- Comment #12 from Martin Sebor --- (In reply to Jakub Jelinek from comment #10) > So, the problem is IMHO that the warning about passing NULL to this is > misplaced, it shouldn't be done in the FEs, but later when there was at > least some cha

[Bug c++/98646] [11 Regression] A static_cast confuses -Wnonnull, causing false positives

2021-01-19 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98646 --- Comment #11 from Martin Sebor --- (In reply to Marek Polacek from comment #5) > A better one: > > // PR c++/98646 > // { dg-do compile } > // { dg-options "-Wnonnull" } > > struct B { > void foo(); > }; > > struct D : B { > void show()

[Bug c++/98646] [11 Regression] A static_cast confuses -Wnonnull, causing false positives

2021-01-18 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98646 --- Comment #10 from Jakub Jelinek --- I don't see how either TREE_NO_WARNING or some magic call would help. Because the user can also write: // PR c++/98646 // { dg-do compile } // { dg-options "-Wnonnull" } struct B { void foo (); }; struct D

[Bug c++/98646] [11 Regression] A static_cast confuses -Wnonnull, causing false positives

2021-01-16 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98646 --- Comment #9 from Martin Sebor --- -Wnonnull still is in the front end (in addition to the middle end). This instance is issued by check_nonnull_arg in c-family/c-common.c, but other similar instances are issued from tree-ssa-ccp.c. Rather th

[Bug c++/98646] [11 Regression] A static_cast confuses -Wnonnull, causing false positives

2021-01-14 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98646 Jakub Jelinek changed: What|Removed |Added CC||jakub at gcc dot gnu.org --- Comment #8

[Bug c++/98646] [11 Regression] A static_cast confuses -Wnonnull, causing false positives

2021-01-14 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98646 --- Comment #7 from Marek Polacek --- Or, disable it when we call build_base_path with nonnull == 1?

[Bug c++/98646] [11 Regression] A static_cast confuses -Wnonnull, causing false positives

2021-01-14 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98646 --- Comment #6 from Marek Polacek --- (In reply to Martin Sebor from comment #1) > Confirmed. It must be an instance we missed in the fix for pr96003 where > the C++ front end adds a COND_EXPR to static_cast. > > The larger context in the trans

[Bug c++/98646] [11 Regression] A static_cast confuses -Wnonnull, causing false positives

2021-01-14 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98646 Richard Biener changed: What|Removed |Added Priority|P3 |P1

[Bug c++/98646] [11 Regression] A static_cast confuses -Wnonnull, causing false positives

2021-01-13 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98646 --- Comment #5 from Marek Polacek --- A better one: // PR c++/98646 // { dg-do compile } // { dg-options "-Wnonnull" } struct B { void foo(); }; struct D : B { void show(); }; void D::show() { constexpr void *p = nullptr; if (p) s

[Bug c++/98646] [11 Regression] A static_cast confuses -Wnonnull, causing false positives

2021-01-13 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98646 --- Comment #4 from Marek Polacek --- The reduced testcase is unfortunately overreduced :(

[Bug c++/98646] [11 Regression] A static_cast confuses -Wnonnull, causing false positives

2021-01-13 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98646 --- Comment #3 from Marek Polacek --- Started with r11-1697.

[Bug c++/98646] [11 Regression] A static_cast confuses -Wnonnull, causing false positives

2021-01-13 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98646 Marek Polacek changed: What|Removed |Added CC||mpolacek at gcc dot gnu.org --- Comment

[Bug c++/98646] [11 Regression] A static_cast confuses -Wnonnull, causing false positives

2021-01-13 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98646 Richard Biener changed: What|Removed |Added Target Milestone|--- |11.0

[Bug c++/98646] [11 Regression] A static_cast confuses -Wnonnull, causing false positives

2021-01-12 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98646 Martin Sebor changed: What|Removed |Added Ever confirmed|0 |1 See Also|