[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
This commit is contained in:
Andrew Pinski 2006-08-14 18:43:28 -07:00
parent b0100da681
commit e63d6886f4
5 changed files with 34 additions and 0 deletions

View file

@ -1,3 +1,11 @@
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>
* Makefile.in (LIBGCC_DEPS): Don't depend on LANGUAGES.

View file

@ -3425,6 +3425,9 @@ build_compound_expr (tree expr1, tree expr2)
else if (warn_unused_value)
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);
}

View file

@ -1,3 +1,11 @@
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>
PR c++/28288

View file

@ -0,0 +1,8 @@
/* { dg-do compile } */
void foo()
{
sizeof(,); /* { dg-error "expected expression before" } */
}

View file

@ -0,0 +1,7 @@
/* { dg-do compile } */
void foo()
{
switch (,) { } /* { dg-error "expected expression before" } */
}