<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<div style="direction: ltr; font-family: Aptos, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Of interest to our group. No action item, but we can discuss this in our next meeting.</div>
<div style="direction: ltr; font-family: Aptos, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div id="ms-outlook-mobile-signature">
<p class="xxmsonormal" style="margin: 0in;"><span style="color: rgb(33, 33, 33);">Regards,<br>
<br>
<b>Rajan Bhakta</b></span></p>
<p class="xxmsonormal" style="margin: 0in;"><span style="color: rgb(33, 33, 33);"><b><br>
</b></span></p>
</div>
<div id="mail-editor-reference-message-container">
<div class="ms-outlook-mobile-reference-message skipProofing">
<meta name="Generator" content="Microsoft Exchange Server">
</div>
<div style="padding: 3pt 0in 0in; border-width: 1pt medium medium; border-style: solid none none; border-color: rgb(181, 196, 223) currentcolor currentcolor;">
<div class="ms-outlook-mobile-reference-message skipProofing" style="text-align: left; font-family: Aptos; font-size: 12pt; color: black;">
<b>From: </b>owner-sc22wg14@open-std.org <owner-sc22wg14@open-std.org> on behalf of Joseph Myers <josmyers@redhat.com><br>
<b>Date: </b>Wednesday, May 27, 2026 at 3:52 PM<br>
<b>To: </b>sc22wg14@open-std.org <sc22wg14@open-std.org><br>
<b>Subject: </b>[EXTERNAL] [SC22WG14.36658] New issue #1068: Standard pragmas after labels<br>
<br>
</div>
</div>
<div class="PlainText" style="font-size: 11pt;">The following new C standard issue has been submitted.<br>
<br>
<a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__www.open-2Dstd.org_jtc1_sc22_wg14_issues_c23_issue1068.html&d=DwICAg&c=BSDicqBQBDjDI9RkVyTcHQ&r=XTIN0AwPKAf2bIKNxlzdeqggAytE5h-JEusWpx9MXwc&m=35Bk5l4rx7pSHwBUqOddVThAFFxy6mEgbFYTkWqCumL2_M6NqaSn5299_ozypcE2&s=6rrbfTvBW9Th6HESFWpuLZ4stHBTlYk6DRBqom_IzvE&e=" data-outlook-id="82983973-9aa3-4997-ac7d-306e262b0393">https://urldefense.proofpoint.com/v2/url?u=https-3A__www.open-2Dstd.org_jtc1_sc22_wg14_issues_c23_issue1068.html&d=DwICAg&c=BSDicqBQBDjDI9RkVyTcHQ&r=XTIN0AwPKAf2bIKNxlzdeqggAytE5h-JEusWpx9MXwc&m=35Bk5l4rx7pSHwBUqOddVThAFFxy6mEgbFYTkWqCumL2_M6NqaSn5299_ozypcE2&s=6rrbfTvBW9Th6HESFWpuLZ4stHBTlYk6DRBqom_IzvE&e=</a><br>
<br>
## Issue 1068: Standard pragmas after labels<br>
<br>
Authors: Jay Ghiron <br>
Date: 2026-05-27 <br>
Submitted against: C23 <br>
Status: Open<br>
<br>
All of the standard pragmas contain wording to require use in specific<br>
contexts:<br>
<br>
> The pragma can occur either outside external declarations or<br>
> preceding all explicit declarations and statements inside a compound<br>
> statement.<br>
<br>
(C23 7.3.4 "The `CX_LIMITED_RANGE` pragma" paragraph 2.)<br>
<br>
> The pragma shall occur either outside external declarations or<br>
> preceding all explicit declarations and statements inside a compound<br>
> statement.<br>
<br>
(C23 7.6.2 "The `FENV_ACCESS` pragma" paragraph 2.)<br>
<br>
> The pragma shall occur either outside external declarations or<br>
> before all explicit declarations and statements inside a compound<br>
> statement.<br>
<br>
(C23 7.6.3 "The `FENV_ROUND` pragma" paragraph 2.)<br>
<br>
> Each pragma can occur either outside external declarations or<br>
> preceding all explicit declarations and statements inside a compound<br>
> statement.<br>
<br>
(C23 7.12.3 "The `FP_CONTRACT` pragma" paragraph 2.)<br>
<br>
Before C23, "all explicit declarations and statements" meant that<br>
nothing could be used before these pragmas in a compound statement.<br>
In C23 the definition of block items in a compound statement was<br>
changed so that labels can be used at the end of a block without any<br>
following statement, and can be used preceding a declaration<br>
([N2508](https://urldefense.proofpoint.com/v2/url?u=https-3A__www.open-2Dstd.org_jtc1_sc22_wg14_www_docs_n2508.pdf&d=DwICAg&c=BSDicqBQBDjDI9RkVyTcHQ&r=XTIN0AwPKAf2bIKNxlzdeqggAytE5h-JEusWpx9MXwc&m=35Bk5l4rx7pSHwBUqOddVThAFFxy6mEgbFYTkWqCumL2_M6NqaSn5299_ozypcE2&s=iKk-ea14nhzJ_gIzHDrffcBiSLoeWGauVKBCul1uVtA&e=
 )).<br>
Consequently it appears the following is now valid:<br>
<br>
```c<br>
int main(){<br>
label:<br>
#pragma STDC FENV_ACCESS OFF<br>
}<br>
```<br>
<br>
While even using a null statement before is undefined.  It seems<br>
unintended to allow labels to be used like this while placing<br>
restrictions on other block items.<br>
<br>
### Suggested correction<br>
<br>
Modify C23 7.3.4 paragraph 2:<br>
<br>
> The pragma can occur either outside external declarations or<br>
> preceding all <del>explicit declarations and<br>
> statements</del><ins>block items</ins> inside a compound statement.<br>
<br>
Modify C23 7.6.2 paragraph 2:<br>
<br>
> The pragma shall occur either outside external declarations or<br>
> preceding all <del>explicit declarations and<br>
> statements</del><ins>block items</ins> inside a compound statement.<br>
<br>
Modify C23 7.6.3 paragraph 2:<br>
<br>
> The pragma shall occur either outside external declarations or<br>
> before all <del>explicit declarations and statements</del><ins>block<br>
> items</ins> inside a compound statement.<br>
<br>
Modify C23 7.12.3 paragraph 2:<br>
<br>
> Each pragma can occur either outside external declarations or<br>
> preceding all <del>explicit declarations and<br>
> statements</del><ins>block items</ins> inside a compound statement.<br>
<br>
Modify C23 J.2 paragraph 1:<br>
<br>
> The `CX_LIMITED_RANGE`, `FENV_ACCESS`<ins>, `FENV_ROUND`,<br>
> `FENV_DEC_ROUND`</ins>, or `FP_CONTRACT` pragma is used in any<br>
> context other than outside all external declarations or preceding<br>
> all <del>explicit declarations and statements</del><ins>block<br>
> items</ins> inside a compound statement (7.3.4, 7.6.2<ins>, 7.6.3,<br>
> 7.6.4</ins>, 7.12.3).<br>
<br>
Note: Each of the standard pragmas express these requirements<br>
differently.  Since the result is supposed to be undefined if the<br>
requirements are not met, they should probably all use the "shall"<br>
wording.<br>
<br>
</div>
</div>
</body>
</html>