
490 N.E.2d 1147 (1986)
Jeffrey MAYNARD and Patricia Maynard, Appellants,
v.
FLANAGIN BROTHERS, Inc., Appellee.
No. 3-1084-A-273.
Court of Appeals of Indiana, Third District.
April 3, 1986.
Michael S. Baechle, Patrick J. Dougherty, Spangler, Jennings, Spangler, Dougherty, P.C., Merrillville, for appellants.
F. Joseph Jaskowiak, Hoeppner, Wagner & Evans, Valparaiso, for appellee.
*1148 STATON, Presiding Judge.

ON PETITION FOR REHEARING
Flanagin Brothers, Inc. petitions for rehearing of our decision in Maynard v. Flanagin Brothers, Inc. (1985) Ind. App., 484 N.E.2d 71 in which we reversed the trial court's grant of summary judgment in favor of Flanagin. The petition is denied, but we write to clarify several points raised by the parties.
The Construction Industry Safety Code, 610 IAC 5-1-1 et seq. relied upon by plaintiff Maynard as the basis for Flanagin's liability, was promulgated pursuant to IC XX-X-X-XX in 1960. Neither the enabling statute nor the regulations have been repealed or substantially amended since that time. Subsequent to the promulgation of the Construction Industry Safety Code, Indiana enacted the Indiana Occupational Safety and Health Act, IC 22-8-1.1-1 et seq, patterned after the federal OSHA Statute 29 U.S.C. section 651 et seq. Although IOSHA itself specifically denies that it creates a private right of action, it also provides that "nothing in this chapter [22-8-1.1-1 - 22-8-1.1-50] shall be construed to supersede or in any manner affect any workmen's compensation or occupational diseases law, or any other statutory rights, duties, or liabilities... ." IC 1971, 22-8-1.1-48.3, as added by Acts 1973, P.L. 241, section 53, p. 1255. Since the CISC predated IOSHA by some eleven years, it cannot be seriously contended that the Construction Industry Safety Code was promulgated under or by the authority of IOSHA. Furthermore, since IOSHA specifically denies superseding any statutory rights or duties, CISC is not affected by IOSHA's prohibition against the creation of a private right of action.
We have re-examined the trial court's judgment and the pleadings, motions and memoranda which the trial court had before it in rendering judgment and we find that Flanagin's federal preemption argument was never raised nor before the court. The judgment does not reflect any consideration of a pre-emption argument and the record does not disclose any evidence which would support affirming the trial court's judgment on that theory. While it is true that a judgment may be affirmed on any theory which is supported by the evidence in the record, Wingett v. Teledyne Industries, Inc., (1985) Ind., 479 N.E.2d 51, it is also true that a party with the burden of proving a matter constituting an avoidance or an affirmative defense must either have set forth the defense in a responsive pleading or have litigated it by consent of the parties. Indiana Rules of Procedure, Trial Rule 8(C); Lafary v. Lafary (1985) Ind. App., 476 N.E.2d 155. Where the record does not reveal that such an issue was ever before the trial court either by way of a responsive pleading or by argument of the parties, it would be unfair to affirm the judgment on a theory which the appellant was able to oppose for the first time in its reply brief. Indiana & Michigan Electric Co. v. Terre Haute Industries, Inc. (1984) Ind. App., 467 N.E.2d 37. It is with these principles in mind that we reaffirm our holding that Flanagin may not present the issue of pre-emption for the first time on appeal.
Having disposed of the question of IOSHA's affect upon the CISC, we wish only to reiterate our opinion that IC XX-X-X-XX authorizes regulations imposing upon prime contractors a duty to ensure compliance with safety regulations for the protection of all workers on a job site. See Katapodis v. Koppers Co., Inc., 770 F.2d 655 (7th Cir.1985); Jones v. City of Logansport (1982) Ind. App., 436 N.E.2d 1138. Flanagin as a prime contractor was, therefore, charged by law with a specific duty which excepted it from the general rule of non-liability for the employees of independent contractors. In the absence of any legislative expression to the contrary, we may infer Maynard's private right of action under the general rule that where a statute imposes a duty for the benefit or protection of particular individuals or classes of individuals, a violation of such duty gives a right of action to any person for whose benefit or protection the statute was enacted *1149 for any damages he has sustained thereby. 1A CJS Actions, section 23 p. 369.
Petition for rehearing denied.
GARRARD, J., concurs.
HOFFMAN, J., dissents and would grant hearing.
