Correct, I tested it and it is not the multiple aspect, it's the invalid declaration. int x = 2 is a valid statement so presumably the while compilation is valid despite the declaration problem if it was elsewhere. We live and learn.
You can use a declaration there but it appears to me it will not be interpreted as a declaration. It will be interpreted as a true/false proposition and int x = 100 is true whereasint x <= 100 is simply an error so it's neither true nor false.