Commit e63d6886 by Andrew Pinski

[multiple changes]

2006-07-14  Andrew Pinski  <pinksia@physics.uc.edu>

        PR c/27490
        PR c/27489
        * c-typeck.c (build_compound_expr): If the second expression
        is an error mark, then just return an error mark instead of
        creating a COMPOUND_EXPR.
2006-08-14  Andrew Pinski  <pinskia@physics.uc.edu>

        PR c/27490
        * gcc.dg/sizeof-2.c: New testcase.

        PR c/27489
        * gcc.dg/switch-A.c: New testcase.

From-SVN: r116148
parent b0100da6
2006-07-14 Andrew Pinski <pinksia@physics.uc.edu>
PR c/27490
PR c/27489
* c-typeck.c (build_compound_expr): If the second expression
is an error mark, then just return an error mark instead of
creating a COMPOUND_EXPR.
2006-07-14 Mike Stump <mrs@apple.com> 2006-07-14 Mike Stump <mrs@apple.com>
* Makefile.in (LIBGCC_DEPS): Don't depend on LANGUAGES. * Makefile.in (LIBGCC_DEPS): Don't depend on LANGUAGES.
......
...@@ -3425,6 +3425,9 @@ build_compound_expr (tree expr1, tree expr2) ...@@ -3425,6 +3425,9 @@ build_compound_expr (tree expr1, tree expr2)
else if (warn_unused_value) else if (warn_unused_value)
warn_if_unused_value (expr1, input_location); warn_if_unused_value (expr1, input_location);
if (expr2 == error_mark_node)
return error_mark_node;
return build2 (COMPOUND_EXPR, TREE_TYPE (expr2), expr1, expr2); return build2 (COMPOUND_EXPR, TREE_TYPE (expr2), expr1, expr2);
} }
......
2006-08-14 Andrew Pinski <pinskia@physics.uc.edu>
PR c/27490
* gcc.dg/sizeof-2.c: New testcase.
PR c/27489
* gcc.dg/switch-A.c: New testcase.
2006-08-14 Steve Ellcey <sje@cup.hp.com> 2006-08-14 Steve Ellcey <sje@cup.hp.com>
PR c++/28288 PR c++/28288
/* { dg-do compile } */
void foo()
{
sizeof(,); /* { dg-error "expected expression before" } */
}
/* { dg-do compile } */
void foo()
{
switch (,) { } /* { dg-error "expected expression before" } */
}
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