Romans 2:12
For as many as have sinned without the law shall also perish without the law:—The Gentiles had been without law, yet sinned. They were without law because they were gross sinners and refused to honor the Lawgiver and obey the law. During all the ages of the Jewish nation any Gentile could come under and obey the law by becoming a Jew. Then so soon as Gentiles were willing to obey God they were blessed. If the Gentiles, who were without law, sin, God will punish without the law because they would not obey the law.
and as many as have sinned under the law shall be judged by the law;—But if the Jews under the law sin, they will be condemned by the law, and so perish. All who sin, whether within the law or without the law, perish. If any who are not under the law, the Gentiles, come to know the things that are in the law, and of their own choice do the things of the law, they become a law unto themselves, and, doing the things contained in the law of their own free will, show that the works required by the law are written in their hearts. They obey the law not because they are under the law, but because in their hearts they love the things contained in the law, so they will be saved by the law. All persons out of Christ are in a lost condition, and can be saved only by the redemption that is found in Christ.