re PR c++/53301 (Spurious -Wzero-as-null-pointer-constant with reference arguments)
/cp 2012-05-10 Paolo Carlini <paolo.carlini@oracle.com> PR c++/53301 * decl.c (check_default_argument): Fix typo (POINTER_TYPE_P instead of TYPE_PTR_P) in zero-as-null-pointer-constant warning. /testsuite 2012-05-10 Paolo Carlini <paolo.carlini@oracle.com> PR c++/53301 * g++.dg/warn/Wzero-as-null-pointer-constant-6.C: New. From-SVN: r187378
This commit is contained in:
parent
b703a889f1
commit
635331b702
|
@ -1,3 +1,9 @@
|
|||
2012-05-10 Paolo Carlini <paolo.carlini@oracle.com>
|
||||
|
||||
PR c++/53301
|
||||
* decl.c (check_default_argument): Fix typo (POINTER_TYPE_P
|
||||
instead of TYPE_PTR_P) in zero-as-null-pointer-constant warning.
|
||||
|
||||
2012-05-03 Paolo Carlini <paolo.carlini@oracle.com>
|
||||
|
||||
PR c++/53186
|
||||
|
|
|
@ -10578,7 +10578,7 @@ check_default_argument (tree decl, tree arg)
|
|||
|
||||
if (warn_zero_as_null_pointer_constant
|
||||
&& c_inhibit_evaluation_warnings == 0
|
||||
&& (POINTER_TYPE_P (decl_type) || TYPE_PTR_TO_MEMBER_P (decl_type))
|
||||
&& (TYPE_PTR_P (decl_type) || TYPE_PTR_TO_MEMBER_P (decl_type))
|
||||
&& null_ptr_cst_p (arg)
|
||||
&& !NULLPTR_TYPE_P (TREE_TYPE (arg)))
|
||||
{
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2012-05-10 Paolo Carlini <paolo.carlini@oracle.com>
|
||||
|
||||
PR c++/53301
|
||||
* g++.dg/warn/Wzero-as-null-pointer-constant-6.C: New.
|
||||
|
||||
2012-05-10 Eric Botcazou <ebotcazou@adacore.com>
|
||||
|
||||
* gnat.dg/lto11.ad[sb]: New test.
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
// PR c++/53301
|
||||
// { dg-options "-Wzero-as-null-pointer-constant" }
|
||||
|
||||
class x { public: x(int v) {} };
|
||||
|
||||
void foo(const x& = 0);
|
Loading…
Reference in New Issue