While a plaintiff may raise new legal theories on appeal from a dismissal on a general demurrer attacking the legal sufficiency of the complaint’s factual allegations, that rule does not apply to an appeal from a dismissal on the ground that the claims alleged in the complaint are barred by the compulsory cross-complaint rule codified in CCP 426.10. An appellate court may, in its discretion, consider new legal theories not presented to the trial court, but it is not required to do so, and here declined to do so because it was a private dispute, not raising any question of public concern, and the dispute had been heavily litigated in two prior cases.