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]

Re: [C++ PATCH] Adjust -Wsequence-point for C++17 changes (PR c++/91415)


On 8/12/19 8:48 AM, Jakub Jelinek wrote:
> Hi!
> 
> The following patch adds some tweaks for -Wsequence-point warning for C++17
> and later.  In particular, stop warning about no sequence point in between
> <<, >>, ., -> and [] expressions, where E1 is in C++17 sequenced before E2.
> 
> Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?
> 
> As mentioned in the PR, this is just part of the needed changes, I've tried
> to adjust handling of MODIFY_EXPR, but didn't figure out exactly what needs
> to be done, and .* / ->* aren't handled either, and CALL_EXPR needs probably
> some verification too.
> 
> 2019-08-12  Jakub Jelinek  <jakub@redhat.com>
> 
> 	PR c++/91415
> 	* c-common.c (verify_tree): For LSHIFT_EXPR, RSHIFT_EXPR,
> 	COMPONENT_REF and ARRAY_REF in cxx_dialect >= cxx17 mode handle it
> 	like COMPOUND_EXPR rather than normal expression.
> 
> 	* g++.dg/warn/sequence-pt-4.C: New test.
OK
jeff


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