If something is not illegal, as in added to the code of law, it is legal. For bitcoin to become illegal there would have to be established laws against it. If there are no such laws, it's completely legal, and since law doesn't work backwards, if it's ever outlawed, nobody will be able to prosecute you for using it in the past.
Also, it's worth mentioning that some countries already have laws that make bitcoin legal and protected by law, which means if somebody steals your coins you can go to the police, like you would have if they stole physical items.
there is no law anywhere that says bitcoin violates the law, because basically bitcoin is only money that has no form, how it can violate the law, what happens is that bitcoin abusers buy something that is in violation of the law, so it all depends on its use, not bitcoin the problem, but the user has a problem.
in fact there are several criteria about the law against bitcoin, some do not allow bitcoin at all, some do not allow bitcoin to be used as a legitimate transaction but do not prohibit exchange. but it's already the country that accepts bitcoin. but with the development of technological civilization, bitcoin by itself will be accepted.