cplusplus / cplusplus/draft

ISO C structs with different tags are incompatible

Open
#6,791 7 comments 0 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

[diff.basic]/5 states:

C allows “compatible types” in several places, C++ does not. For example, otherwise-identical struct types with different tag names are “compatible” in C but are distinctly different types in C++.

That hasn’t been true for C for quite a while now.

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

The disputed statement is in [diff.basic]/5; start by reading that paragraph and its surrounding C/C++ type-compatibility wording. Check the claim against the relevant ISO C and C++ rules, then revise the draft text so it accurately reflects current C behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, cpp
Domain
compilers
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.