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:
parent
6b57ac2977
commit
1dcf683ec2
|
@ -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.
|
||||
|
|
1254
gcc/cp/parse.c
1254
gcc/cp/parse.c
File diff suppressed because it is too large
Load Diff
|
@ -919,7 +919,6 @@ xcond:
|
|||
/* empty */
|
||||
{ $$ = NULL_TREE; }
|
||||
| condition
|
||||
{ $$ = condition_conversion ($$); }
|
||||
| error
|
||||
{ $$ = NULL_TREE; }
|
||||
;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
}
|
Loading…
Reference in New Issue