This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/53224] New: synthesized_method_walk returns uninitialized values
- From: "hjl.tools at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 04 May 2012 02:37:41 +0000
- Subject: [Bug c++/53224] New: synthesized_method_walk returns uninitialized values
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53224
Bug #: 53224
Summary: synthesized_method_walk returns uninitialized values
Classification: Unclassified
Product: gcc
Version: 4.8.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: hjl.tools@gmail.com
static void
synthesized_method_walk (tree ctype, special_function_kind sfk, bool const_p,
tree *spec_p, bool *trivial_p, bool *deleted_p,
bool *constexpr_p, bool diag)
{
tree binfo, base_binfo, scope, fnname, rval, argtype;
bool move_p, copy_arg_p, assign_p, expected_trivial, check_vdtor;
VEC(tree,gc) *vbases;
int i, quals, flags;
tsubst_flags_t complain;
const char *msg;
bool ctor_p;
if (spec_p)
*spec_p = (cxx_dialect >= cxx0x ? noexcept_true_spec : empty_except_spec);
if (deleted_p)
{
/* "The closure type associated with a lambda-expression has a deleted
default constructor and a deleted copy assignment operator."
This is diagnosed in maybe_explain_implicit_delete. */
if (LAMBDA_TYPE_P (ctype)
&& (sfk == sfk_constructor
|| sfk == sfk_copy_assignment))
{
*deleted_p = true;
return;
}
*deleted_p = false;
}
trivial_p and constexpr_p may not be initialized here.