C++ Logo


Advanced search

Re: [wg14/wg21 liaison] P2961R1 syntax for Contracts: viable for C?

From: Joseph Myers <joseph_at_[hidden]>
Date: Mon, 9 Oct 2023 23:09:44 +0000
On Fri, 6 Oct 2023, Jens Maurer via Liaison wrote:

> In the following example:
> [[nodiscard('a')]] bool f();
> Is a conforming implementation of C required to diagnose the
> bad argument for the "nodiscard" attribute?
> My understanding is that the "... is ignored" in the quoted section
> C23 6.7.12p2 means "a conforming implementation is not required to
> diagnose the above translation unit".

This is where WG14 rejected C23 CD1 comments CA-084 and US-085 (which
proposed to require diagnosis in such cases).

Joseph S. Myers

Received on 2023-10-09 23:09:50