This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: C++ PATCH for c++/70584 (parenthesized argument to x86 builtin)
- From: Jason Merrill <jason at redhat dot com>
- To: gcc-patches List <gcc-patches at gcc dot gnu dot org>
- Cc: Patrick Palka <patrick at parcs dot ath dot cx>, Daniel Gutson <daniel dot gutson at tallertechnologies dot com>, Andres Tiraboschi <andres dot tiraboschi at tallertechnologies dot com>
- Date: Tue, 24 May 2016 16:54:13 -0400
- Subject: Re: C++ PATCH for c++/70584 (parenthesized argument to x86 builtin)
- Authentication-results: sourceware.org; auth=none
- References: <1d5430ea-4d5d-0fb1-aa11-695af802c472 at redhat dot com>
On 05/23/2016 02:58 PM, Jason Merrill wrote:
The C++14 decltype(auto) obfuscation was confusing the x86 builtin; it's
a simple matter to undo it during delayed folding, thanks to the
maybe_undo_parenthesized_ref function that Patrick recently introduced.
But using cp_fold_maybe_rvalue here is wrong, as it will mean
unconditionally replacing a variable with its initializer. Better to
use plain cp_fold and improve cp_fold_maybe_rvalue to handle getting a
decl back from cp_fold.
Tested x86_64-pc-linux-gnu, applying to trunk.