From 8a1586c6ba34cfd524dba6a209f7743d14dbe8df Mon Sep 17 00:00:00 2001 From: Hubert Tong Date: Tue, 16 Dec 2025 23:52:12 -0500 Subject: [PATCH 1/2] [diff.basic] Use enum example instead of example outdated since C99 C99 subclause 6.2.7, "Compatible type and composite type", had this sentence: > If one is declared with a tag, the other shall be declared with the > same tag. --- source/compatibility.tex | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/source/compatibility.tex b/source/compatibility.tex index a0ae25da56..32a7cf5368 100644 --- a/source/compatibility.tex +++ b/source/compatibility.tex @@ -2916,11 +2916,10 @@ \diffref{basic.types} \change -C allows ``compatible types'' in several places, \Cpp{} does not.\\ +C allows mixing between ``compatible types'' in several places where \Cpp{} does not.\\ For example, -otherwise-identical \keyword{struct} types with different tag names -are ``compatible'' in C but are distinctly different types -in \Cpp{}. +enumerated types are ``compatible'' with their underlying types in C but, in \Cpp{}, +enumerations are types distinct from their underlying types. \rationale Stricter type checking is essential for \Cpp{}. \effect From b2b6ad64fd4b03934e64e7014c463d6b348d2f70 Mon Sep 17 00:00:00 2001 From: Hubert Tong Date: Tue, 16 Dec 2025 23:57:14 -0500 Subject: [PATCH 2/2] [diff.basic] Stop claiming, as harmless, type-based aliasing violations --- source/compatibility.tex | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/source/compatibility.tex b/source/compatibility.tex index 32a7cf5368..edbd9196d1 100644 --- a/source/compatibility.tex +++ b/source/compatibility.tex @@ -2927,9 +2927,8 @@ \difficulty Semantic transformation. The ``typesafe linkage'' mechanism will find many, but not all, -of such problems. -Those problems not found by typesafe linkage will continue to -function properly, +such problems. +Some cases are allowed by \Cpp{} according to the ``layout compatibility rules'' of this document. \howwide