Romans 2:12 : For as many as have sinned without the law shall also perish without the law: and as many as have sinned under the law shall be judged by the law. In Paul's language, "the law" referred to the law of Moses. The law of Moses did not extend to the Gentiles. The grievous sins charged against them in the preceding chapter had not been committed under the law of Moses, nor against the law. We are sure of two things with reference to them--namely, (1) they had sinned, and (2) they had not sinned under the law of Moses. This being true, they would not be judged by the law of Moses, but would perish with-out the law.
From Mount Sinai to the cross of Christ the children of Israel were under the law of Moses. The sins they committed were committed under the law and against the law, and by the law they will be judged. But Paul's language clearly shows that only those who were under the law will be judged by the law. As this law did not extend to the Gentiles, they will not be judged by it.