Set and test no-warning bit to avoid -Wnonnull for synthesized expressions.
Resolves:
PR c++/96003 spurious -Wnonnull calling a member on the result of static_cast
gcc/c-family/ChangeLog:
PR c++/96003
* c-common.c (check_function_arguments_recurse): Return early when
no-warning bit is set.
gcc/cp/ChangeLog:
PR c++/96003
* class.c (build_base_path): Set no-warning bit on the synthesized
conditional expression in static_cast.
gcc/testsuite/ChangeLog:
PR c++/96003
* g++.dg/warn/Wnonnull7.C: New test.