cplusplus / cplusplus/draft

[diff.iso] Some examples are out date in C23

Open
#9,266 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

P2-Bug
Dominant language
TeX
Stars
221
Forks
813
Avg merge
16h 4m
Merged PRs (30d)
36

Description

The following is a list of all of the out of date instances that I have found:

  • [diff.dcl]/7 C23 has removed unprototyped functions.
  • [diff.dcl]/9 C23 has removed old-style function definitions.
  • [diff.lex]/3 C23 has required that different encoding prefixes cannot be mixed. Also, C17 made combinations such as u8"" and L"" invalid.

As an aside, the following looks to be out of date too [diff.dcl]/10.2:

In C++, designators for non-static data members must be specified in declaration order, designators for array elements and nested designators are not supported, and designated and non-designated initializers cannot be mixed in the same initializer list.

The last part of this sentence appears to be incorrect with P2287, if "initializer list" is taken to have the C meaning (C++ does not describe designated initializers as being part of an initializer list). Though because this only applies to base classes this cannot actually be used by C code.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Review the linked [diff.dcl] and [diff.lex] sections against the C23 changes described in the issue, then examine [diff.dcl]/10.2 alongside paper P2287R6. Update the outdated examples and wording, and confirm that each cited C23 and designated-initializer statement matches the current standard draft.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.