
220 S.E.2d 417 (1975)
28 N.C. App. 91
Anthony Paul BENTON
v.
W. H. WEAVER CONSTRUCTION COMPANY.
No. 7510SC682.
Court of Appeals of North Carolina.
December 17, 1975.
*419 Blanchard, Tucker, Twiggs & Denson by Charles F. Blanchard and Charles A. Parlato, Raleigh, for plaintiff appellant.
Smith, Anderson, Blount & Mitchell by John L. Jernigan, Raleigh, for defendant appellee.
HEDRICK, Judge.
Both the plaintiff and the defendant have argued in their briefs the question of whether the plaintiff can recover in this action for damages for personal injury against this defendant on the theory that the defendant breached its contract with the State of North Carolina to provide certain safety measures in the construction of the Bath Building, without regard to negligence. Neither party, however, seems to have given consideration to the question of whether plaintiff's complaint, when liberally construed, states a claim upon which relief can be granted.
A complaint may be dismissed pursuant to Rule 12(b)(6),
"`if clearly without any merit; and this want of merit may consist in an absence of law to support a claim of the sort made, or of facts sufficient to make a good claim, or in the disclosure of some fact which will necessarily defeat the claim.' But a complaint should not be dismissed for insufficiency unless it appears to a certainty that plaintiff is entitled to no relief under any state of facts which could be proved in support of the claim. Pleadings are to be liberally construed. Mere vagueness or lack of detail is not ground for a motion to dismiss, but should be attacked by a motion for a more definite statement."
2A Moore, Federal Practice § 12.08 (1975). Accord, Sutton v. Duke, 277 N.C. 94, 176 S.E.2d 161 (1970). In Sutton v. Duke, Justice Sharp, now Chief Justice, wrote:
"Under the `notice theory of pleading' a statement of claim is adequate if it gives sufficient notice of the claim asserted `to enable the adverse party to answer and prepare for trial, to allow for the application of the doctrine of res judicata, and to show the type of case brought. . . .' Moore § 8.13" Id. at 102, 176 S.E.2d at 165.
Any construction of the complaint in this cause reveals that plaintiff's claim is for damages for personal injuries allegedly resulting from his fall through an unguarded elevator shaft on a building under construction wherein the defendant was the general contractor. In determining the sufficiency of a complaint to state a claim upon which relief can be granted when challenged by a 12(b)(6) motion, the federal courts have consistently held that the legal theory upon which a claim may be bottomed does not determine the validity of a claim; and particular legal theories of counsel yield to the court's duty to grant the relief to which the prevailing party is entitled, whether demanded or not. See, Thompson v. Allstate Insurance Company, 476 F.2d 746 (5th Cir. 1973); New Amsterdam Casualty Company v. Waller, 323 F.2d 20 (4th Cir. 1963), cert. denied, 376 U.S. 963, 84 S.Ct. 1124, 11 L.Ed.2d 981 (1964); United States v. Martin, 267 F.2d 764 (10th Cir. *420 1959); Dotschay v. National Mutual Insurance Company, 246 F.2d 221 (5th Cir. 1957); Gins v. Mauser Plumbing Supply Co., 148 F.2d 974 (2d Cir. 1945).
Our concern, therefore, is not whether the complaint states a claim upon which relief can be granted on a theory of breach of contract, but rather whether the complaint when liberally construed states a claim for this plaintiff in this case against this defendant upon which relief can be granted on any theory.
It is well settled in North Carolina that where a contract between two parties is intended for the benefit of a third party, the latter may maintain an action in contract for its breach or in tort if he has been injured as a result of its negligent performance. Toone v. Adams, 262 N.C. 403, 137 S.E.2d 132 (1964).
"The parties to a contract impose upon themselves the obligation to perform it; the law imposes upon each of them the obligation to perform it with ordinary care and they may not substitute a contractual standard for this obligation. A failure to perform a contractual obligation is never a tort unless such nonperformance is also the omission of a legal duty. Council v. Dickerson's, Inc. [233 N.C. 472, 64 S.E.2d 551 (1951)]. The contract merely furnishes the occasion, or creates the relationship which furnishes the occasion, for the tort." Id. at 407, 137 S.E.2d at 135.
Allegations in the complaint tending to support plaintiff's claim on the theory that defendant breached its contract with the State to provide specific safety measures are not "the disclosure of some fact which will necessarily defeat the claim". Sutton v. Duke, supra. In our opinion, the statement of plaintiff's claim in the complaint is sufficient to enable the adverse party to answer and prepare for trial, to allow for the application of the doctrine of res judicata, and to show the type of case brought. Sutton v. Duke, supra.
Therefore, construing the complaint liberally in light of the foregoing principles of substance and procedure, plaintiff's allegations, if supported by competent evidence, are sufficient to permit a finding that the plaintiff, as an employee of a subcontractor, fell through an unguarded elevator shaft in a building under construction wherein the defendant was a general contractor, and that such fall was proximately caused by the negligence of the defendant in failing to exercise ordinary care for the safety of persons rightfully on the premises in violation of the defendant's duty imposed by law to such persons.
For the reasons stated, the judgment appealed from is reversed and the cause is remanded to the Superior Court for further proceedings.
Reversed and Remanded.
PARKER and ARNOLD, JJ., concur.
