Commit f7716d57 by Jakub Jelinek Committed by Jakub Jelinek

re PR c++/57274 (Bogus sequence-point warning in C++)

	PR c++/57274
	* c-common.c (verify_tree): Don't recurse into SIZEOF_EXPR.

	* c-c++-common/Wsequence-point-1.c: New test.

From-SVN: r198903
parent 71b04de2
2013-05-14 Jakub Jelinek <jakub@redhat.com>
PR c++/57274
* c-common.c (verify_tree): Don't recurse into SIZEOF_EXPR.
2013-05-10 Marc Glisse <marc.glisse@inria.fr>
* c-common.c (vector_types_convertible_p): No TYPE_PRECISION for
......
......@@ -3032,6 +3032,7 @@ verify_tree (tree x, struct tlist **pbefore_sp, struct tlist **pno_sp,
switch (code)
{
case CONSTRUCTOR:
case SIZEOF_EXPR:
return;
case COMPOUND_EXPR:
......
2013-05-14 Jakub Jelinek <jakub@redhat.com>
PR c++/57274
* c-c++-common/Wsequence-point-1.c: New test.
2013-05-14 Marc Glisse <marc.glisse@inria.fr>
* g++.dg/ext/vector22.C: New testcase.
......
/* PR c++/57274 */
/* { dg-do compile } */
/* { dg-options "-Wsequence-point" } */
void foo (int, int);
void
bar (int *x)
{
foo (*x++, sizeof (*x)); /* { dg-bogus "may be undefined" } */
}
void
baz (int *x)
{
foo (*x, sizeof (*x++) + sizeof (*x++)); /* { dg-bogus "may be undefined" } */
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment