Weird Code in parse.y (java_layout_seen_class_methods)

Ranjit Mathew rmathew@gmail.com
Thu Jun 10 13:33:00 GMT 2004


Hi,
 Consider the body of java_layout_seen_class_methods()
in parse.y:
-------------------------- 8< --------------------------
 7577 void java_layout_seen_class_methods (void)
 7578 {
 7579 tree previous_list = all_class_list;
 7580 tree end = NULL_TREE;
 7581 tree current;
 7582
 7583 while (1)
 7584 {
 7585 for (current = previous_list;
 7586 current != end; current = TREE_CHAIN (current))
 7587 layout_class_methods (TREE_TYPE (TREE_VALUE (current)));
 7588
 7589 if (previous_list != all_class_list)
 7590 {
 7591 end = previous_list;
 7592 previous_list = all_class_list;
 7593 }
 7594 else
 7595 break;
 7596 }
 7597 }
-------------------------- 8< --------------------------
How can code between 7590-7593 ever execute?
And why is there a while(1) around the for loop?
Is this some vestigial code that should have been
removed?
BTW, the method name is not the first word on
the line #7577.
Thanks,
Ranjit.
-- 
Ranjit Mathew Email: rmathew AT gmail DOT com
Bangalore, INDIA. Web: http://ranjitmathew.tripod.com/


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /