This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[C++ Patch] PR 54170


Hi,

this wrong code PR is some sort of continuation of PR 52988, where we discard side-effects of expression of nullptr_t. Here too, in cp_convert_to_pointer and in build_ptrmemfunc, we don't check for side-effects and we replace the expression with a plain int_cst or nullptr_node. The testcase in the PR exercises only plain pointers but we have also to handle correctly pointers to members, thus I extended it and the patch became slightly more complex: for the case of pointer to data member in particular I have to call by hand build2 and build a COMPOUND_EXPR to host the side-effects (similarly to what I found used in cp_build_addr_expr_1).

Tested x86_64-linux.

Thanks,
Paolo.

/////////////////////////////

Attachment: CL_54170
Description: Text document

Attachment: patch_54170
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]