Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

[dcl.contract.func]/4 Missing IFNDR

未关闭
#9,345 3 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
55/100
Issue 类型
文档
描述清晰度
基本清楚
活跃度
活跃
技术栈
cpp, latex, tex

调研方向

The issue points to missing IFNDR (ill-formed, no diagnostic required) clauses in the C++ standard draft. Start by reading the linked sections [dcl.contract.func]/4 and /5 and the IFNDR annex G.6.4. Compare the wording to identify the discrepancy: one IFNDR case about mismatched contract specifiers in first declarations across translation units is documented, but another about non-first declarations may be missing. Verify the draft's structure and propose an edit to the LaTeX source, likely in the relevant .tex files under the 'dcl' or 'ifndr' sections.

由索引模型根据 Issue 内容生成。

描述

ub-ifndr

[dcl.contract.func]/4 says

A declaration D of a function or function template f that is not a first declaration shall have either no function-contract-specifier-seq or the same function-contract-specifier-seq (see below) as any first declaration F reachable from D.
If D and F are in different translation units, a diagnostic is required only if D is attached to a named module.
If a declaration F₁ is a first declaration of f in one translation unit and a declaration F₂ is a first declaration of f in another translation unit, F₁ and F₂ shall specify the same function-contract-specifier-seq, no diagnostic required ([ifndr:dcl.contract.func.mismatched.contract.specifiers]).

There are two IFNDR cases, one about not-the-first declarations and another is about first declarations.

However, G.6.4 is only about the latter case.

If two different first declarations of a function (which must therefore not be reachable from one another) do not have equivalent function contract specifiers the program is ill-formed, no diagnostic required.

BTW, [dcl.contract.func]/5 has a totally missing IFNDR

... If this condition is not met solely due to the comparison of two lambda-expressions that are contained within P₁ and P₂, no diagnostic is required.

主要语言
TeX
星标
221
派生
813
平均合并
17 小时 45 分钟
30 天内合并 PR
34

贡献指南

这个仓库没有索引到贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

cplusplus/draft 的其他 Issue

查看 cplusplus/draft 的全部 Issue

相似的 Issue

更多 Compilers Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。