Skip to content

Fix sections numbers in existing \xrefc and \IsoC#8113

Merged
jensmaurer merged 1 commit into
cplusplus:mainfrom
frederick-vs-ja:fix-xref-c23
Oct 26, 2025
Merged

Fix sections numbers in existing \xrefc and \IsoC#8113
jensmaurer merged 1 commit into
cplusplus:mainfrom
frederick-vs-ja:fix-xref-c23

Conversation

@frederick-vs-ja
Copy link
Copy Markdown
Contributor

@frederick-vs-ja frederick-vs-ja commented Jul 22, 2025

Currently, there are many mistakes in the section numbers in \xrefc and after \IsoC{}.

  • Some are still section numbers in C17.
  • Some are section numbers in WG14 N3220. Unfortunately, there're many "General" sections added to C23 after N3220.
    • I'm now using section numbers in WG14 N3299 as the new changes didn't seem to alternate any section number from C23.
  • Some seem to be overly updated to match WG14 N3550. These sections are for components in <stddef.h>, while in C2y a new header <stdcountof.h> is added.
  • Some are typo.

Fixes #8109. Fixes #8228.

Copy link
Copy Markdown
Contributor

@timsong-cpp timsong-cpp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noticed a lot of these when reviewing LWG motion 3 too. I haven't gone through all the updates though.

One item that I didn't see here: [cstdarg.syn] p1.1: Cross-reference should be 6.5.3.3.

Comment thread source/text.tex Outdated
Comment thread source/text.tex Outdated
\end{itemdescr}

\xrefc{7.22.7.1, 7.22.8, 7.29.6.2.1}
\xrefc{7.24.8.1, 7.24.9, 7.31.6.3.1}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
\xrefc{7.24.8.1, 7.24.9, 7.31.6.3.1}
\xrefc{7.24.8.2, 7.24.9, 7.31.6.3.1}

I wonder if we can just remove this entire paragraph.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not in this pull request.

@frederick-vs-ja frederick-vs-ja changed the title Fix sections numbers in existing \xrefc Fix sections numbers in existing \xrefc and \IsoC Jul 22, 2025
@frederick-vs-ja
Copy link
Copy Markdown
Contributor Author

One item that I didn't see here: [cstdarg.syn] p1.1: Cross-reference should be 6.5.3.3.

Thanks! I initially didn't intent to fix section numbers after \IsoC{} in this PR. But it's perhaps nice to do so.

@tkoeppe
Copy link
Copy Markdown
Contributor

tkoeppe commented Jul 22, 2025

Please feel free to sqash all this into a single commit, and maybe put all the section references into the joint commit message.

@jwakely would you perhaps be able to have a look?

[intro.abstract] Update to refer to C23 7.23.3

[basic.fundamental] Update to refer to C23 5.3.5.3.2
... due to new sections added after WG14 N3220

[support.types] Un-update to refer to C23 7.21
In WG14 N3550, the section number of <stddef.h> components has become
7.22 due to addition of <stdcountof.h>.

[climits.syn] Update to refer to C23 5.3.5.3.2
... due to new sections added after WG14 N3220

[cfloat.syn] Update to refer to C23 5.3.5.3.3
... due to new sections added after WG14 N3220

[support.start.term] Update to refer to C23 7.24.5
... due to new sections added after WG14 N3220

[cstdarg.syn] Update to refer to C23 6.5.3.3
... due to new sections added after WG14 N3220

[c.malloc] Update to refer to C23 7.24.4

[alg.c.library] Update to refer to C23 7.24.6
... due to new sections added after WG14 N3220

[charconv.to.chars] Update to refer to C23 7.23.6.2

[charconv.from.chars] Update to refer to C23 7.24.2.6, 7.24.2.8

[c.mb.wcs] Update to refer to C23 7.24.8.2, 7.24.9, 7.31.6.3.1, 7.24.8
... and C23 7.30.2, 7.31.6.4, 7.31.6.5 due to new sections added after
WG14 N3220

[c.math.rand] Update to refer to C23 7.24.3

[c.math.abs] Update to refer to C23 7.12.8.3, 7.24.7.1
... partially due to new sections added after WG14 N3220

[c.math.fpclass] Update to refer to C23 7.12.4, 7.12.18
... partially due to new sections added after WG14 N3220, along with
typo fix

[iostream.objects.overview] Update to refer to C23 7.23.2

[print.fun] Update to refer to C23 7.23.2

[cstdio.syn] Update to refer to C23 7.23.3

[depr.c.macros] Update to refer to C23 5.3.5.3.3, 7.33.6
... due to new sections added after WG14 N3220
@frederick-vs-ja
Copy link
Copy Markdown
Contributor Author

Rebased and force-pushed again as some changes are already made in 9e75be6 (thanks to @tkoeppe).

@jensmaurer
Copy link
Copy Markdown
Member

@jwakely , could you please take a look at the library xref fixes here? Thanks!

@jwakely
Copy link
Copy Markdown
Member

jwakely commented Sep 15, 2025

Sorry I missed the initial ping while I was on holiday, looking now ...

Copy link
Copy Markdown
Member

@jwakely jwakely left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These all look correct - thanks for doing this.

@eisenwave
Copy link
Copy Markdown
Member

@jensmaurer could we have this in C++26?

@jensmaurer jensmaurer merged commit 2f53f31 into cplusplus:main Oct 26, 2025
2 checks passed
@frederick-vs-ja frederick-vs-ja deleted the fix-xref-c23 branch October 26, 2025 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

References to C23 (ISO/IEC 9899:2024) clause still use C17 clause numbers [c.math.fpclass] Typo

6 participants