parse.y (xcond): Move call to condition_conversion ...

1998-05-24  Mark Mitchell  <mark@markmitchell.com>
	* parse.y (xcond): Move call to condition_conversion ...
	* semantics.c (finish_for_cond): Here.
	* parse.c: Regenerated.

From-SVN: r20036
This commit is contained in:
Mark Mitchell 1998-05-24 23:52:17 +00:00 committed by Mark Mitchell
parent 6b57ac2977
commit 1dcf683ec2
5 changed files with 656 additions and 632 deletions

View File

@ -1,3 +1,9 @@
1998-05-24 Mark Mitchell <mark@markmitchell.com>
* parse.y (xcond): Move call to condition_conversion ...
* semantics.c (finish_for_cond): Here.
* parse.c: Regenerated.
1998-05-24 Jason Merrill <jason@yorick.cygnus.com>
* decl.c (push_namespace): Namespaces have type void.

File diff suppressed because it is too large Load Diff

View File

@ -919,7 +919,6 @@ xcond:
/* empty */
{ $$ = NULL_TREE; }
| condition
{ $$ = condition_conversion ($$); }
| error
{ $$ = NULL_TREE; }
;

View File

@ -383,8 +383,8 @@ finish_for_cond (cond, for_stmt)
else
{
emit_line_note (input_filename, lineno);
if (cond)
expand_exit_loop_if_false (0, cond);
if (cond)
expand_exit_loop_if_false (0, condition_conversion (cond));
}
/* If the cond wasn't a declaration, clear out the

View File

@ -0,0 +1,23 @@
// Build don't link:
template <class T> class List;
template <class T>
struct ListIterator
{
ListIterator ();
ListIterator (const ListIterator<T>& rhs);
};
template <class T>
struct List
{
void length () const {
for (ListIterator<T> li; li; ); // ERROR - used where a `bool'
}
};
void test(List<int>& vals)
{
vals.length(); // ERROR - instantiated from here
}