8sa1-gcc/gcc/testsuite/g++.old-deja/g++.brendan/scope1.C
Jason Merrill 90418208f9 repo.c (repo_get_id): Handle the case where a class with virtual bases has a null TYPE_BINFO_VTABLE.
* repo.c (repo_get_id): Handle the case where a class with virtual
        bases has a null TYPE_BINFO_VTABLE.

        * parse.y (member_init): Just pass in the type.
        * init.c (expand_member_init): Handle getting a type.

        * decl.c (finish_function): Warn if a function has no return
        statement.
        Suggested by Andrew Koenig.
        * typeck.c (check_return_expr): Do set current_function_returns_value
        if we got an error_mark_node.

From-SVN: r34863
2000-07-04 03:47:11 -04:00

9 lines
196 B
C

// Build don't link:
// GROUPS passed scoping
int f (int i) {
if (i)
for (int j = i; j; j--)
;
return j; // error: j should only be in scope inside the body of `for'// ERROR - .*
}