Re: Endless complaints [was Re: do { quit; } else { }]

Liste des GroupesRevenir à l c 
Sujet : Re: Endless complaints [was Re: do { quit; } else { }]
De : 643-408-1753 (at) *nospam* kylheku.com (Kaz Kylheku)
Groupes : comp.lang.c
Date : 11. Apr 2025, 03:45:47
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <20250410192017.675@kylheku.com>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
User-Agent : slrn/pre1.0.4-9 (Linux)
On 2025-04-10, bart <bc@freeuk.com> wrote:
On 10/04/2025 23:18, Janis Papanagnou wrote:
On 10.04.2025 17:12, bart wrote:
On 10/04/2025 15:33, Scott Lurndal wrote:
bart <bc@freeuk.com> writes:
On 10/04/2025 12:28, Keith Thompson wrote:
bart <bc@freeuk.com> writes:
[...]
Someone, not anyone but the all-knowing Tim, said: "and those types
are not compatible, because the two struct tags are different."
>
Do you agree with that? Or is there something more to making two types
be incompatible?
>
I don't recall the exact discussion
>
It stems from this, a reply from DB dated: "Tue, 8 Apr 2025 16:50:56
+0200". (About half way down there is some quoted code of mine.)
>
It concerned two struct types in different translations units, which
needed to be compatible for the test program to work corectly.
>
I said they were compatible enough. David said they were entirely
compatible. Tim said "No they are not". Three different opinions.
>
If you pretend not to understand the C standard, you can argue
about it forever.
>
It's been explained to you more than once, but really, just read
the flippin standard and stop arguing.
>
Fucking hell.
>
Three people have said three different things. They can't all be right.
>
But according to you, only one of them is wrong: me, even though the
other two have made exactly opposite claims!
>
So to you it's not about who's right and who's wrong; you are just
CONSTANTLY having a go at me personally for reasons that are nothing to
do with the subject. That is persecution.
>
In fact you don't really care about the topic (if you're even aware of
it). So, FUCK YOU.
>
As for reading the standard, since that is this group's favourite
subject, then why does the group even exist? Since every possible
question can be answered there.
 
"I don't recall the exact discussion", and less the context of any
formulation in any of the many posts. I also don't understand what
your goal is. As I see it some posters tried to explain aspects of
the topic to you, and they feel that you didn't understand it but
are instead arguing just for the argument. Your post seems to show
a desire that you want one (or two) of these posters to be wrong.
It was suggested to you to refer to the standard document to clear
the topic since there's obviously an unsolvable communication issue
between the participants.
 
I basically do agree with your perception of this newsgroup and its
purpose. But...
 
*If* you're really interested in the topic, and since all the other
posters obviously gave up to continue explaining their sight to you,
why don't you accept that suggestion and read the standard document
to have clarity about the topic? [FYI; this was a rhetoric question.]
>
I've read the document, or the relevant section. According to that, DB
was wrong, and TR was half-right.
>
Neither of them is willing to back down, while no one else is willing to
back me up: KT will not say anything against his mates, and SL hasn't
really got a clue about the topic, but he never misses a change to put
the boot in when I'm already on the ground.

These persecution complexes are pointless. What backs you up is
chapter-and-verse citations with solid analysis, if required. That's it.

If you don't want to read standards, go to notebooklm.google.com
create a workspace there, and upload the documents into it.

Then you can ask the friendly AI questions about it.

Let me try it. Okay, I gave it C90, draft C99 and the current
workign draft N3301. I have those three documents in the workspace.

Let's try a question to the AI:

  What changed in the concept of two struct types being compatible in
  C90, C99 and the current draft version of C?

The answer is long, but looks pretty good. You don't see it in the
copy and paste, but in the workspace chat window, it has links to
citations from the documents I uploaded to check the facts.

Here is the answer:

  The concept of compatibility between two struct types has evolved across
  C90, C99, and the current draft version of C. Here's a breakdown of
  the key changes:

  C90 Standard:

  In C90, as described in, two structure types declared in separate translation
  units are considered to have **compatible types** if they meet the following
  criteria:

  *   They have the **same number of members**.
  *   The members have the **same names**.
  *   The corresponding members have **compatible types**.
  *   For structures, the members must be declared in the **same order**.
  *   For structures or unions, any **bit-fields** must have the **same widths**.

  It's important to note that C90 primarily focused on the structural
  similarity of the types in terms of their members when declared
  separately. All declarations referring to the same object or function
  were also required to have compatible types. A structure declaration
  introduced a new type within a translation unit, and this type was
  incomplete until the closing brace of the definition.

  C99 Standard:

  C99 introduced the crucial concept of **tags** for determining
  compatibility between structure, union, or enumeration types declared
  in separate translation units. The rules for compatibility became:

  *   If one type is declared with a **tag**, the other must be declared
      with the **same tag**.
  *   If both are **complete types**, they must have:
      *   A **one-to-one correspondence** between their members.
      *   Each pair of corresponding members declared with **compatible
          types**.
      *   If a member has a name, the corresponding member must have the
          **same name**.
      *   For structures, corresponding members must be declared in the
          **same order**.
      *   For structures or unions, corresponding **bit-fields** must
          have the **same widths**.
      *   For enumerations, corresponding members must have the **same
          values**.

  C99 emphasized that for structure, union, or enumerated types declared
  in different scopes or using different tags, they declare **distinct
  types**. Even declarations without a tag declared distinct types. This
  shift towards tag-based compatibility provided a stronger mechanism
  for ensuring type safety across different compilation units.

  Current C Draft (n3301.pdf):

  The current draft of the C standard further refines the rules for
  structure type compatibility:

  *   For two **complete structure, union, or enumerated types declared
      with the same tag** to be compatible:
      *   There must be a **one-to-one correspondence** between their
          members with **compatible types**.
      *   If one member has an **alignment specifier**, the other must
          have an **equivalent alignment specifier**.
      *   Corresponding members must have the **same name**.
      *   For structures, corresponding members must be in the **same
          order**.
      *   For unions declared in the same translation unit,
          corresponding members must be in the **same order**.
      *   Corresponding **bit-fields** must have the **same widths**.
      *   For enumerations, corresponding members must have the **same
          values**, and if one has a **fixed underlying type**, the other must
          have a **compatible fixed underlying type**.
      *   The draft introduces the concept that **anonymous structures
          and unions** are considered regular members, and their types are
          compatible if their members fulfill the preceding requirements.

  *   For structure, union, or enumerated types declared in **separate
      translation units**, they are compatible in the following cases:
      *   Both are declared **without tags** and fulfill the
          member-based requirements.
      *   Both have the **same tag** and are **completed** somewhere in
          their respective translation units, fulfilling the member-based
  requirements.
      *   Both have the **same tag**, and **at least one** of the two
          types is **not completed** in its translation unit.

  The current draft continues to emphasize tag-based compatibility
  but adds nuances like the consideration of alignment specifiers and
  explicitly addresses anonymous structures and unions. The summary of
  changes from C99 mentions "**improved tag compatibility rules, enabling
  more types to be compatible with other types**", indicating a trend
  towards a more flexible yet still type-safe system. Similar to C99,
  declarations in different scopes or with different tags still declare
  distinct types.

--
TXR Programming Language: http://nongnu.org/txr
Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
Mastodon: @Kazinator@mstdn.ca

Date Sujet#  Auteur
4 Apr 25 * do { quit; } else { }625Thiago Adams
4 Apr 25 +* Re: do { quit; } else { }2bart
4 Apr 25 i`- Re: do { quit; } else { }1Thiago Adams
4 Apr 25 +* Re: do { quit; } else { }11Kaz Kylheku
4 Apr 25 i+* Re: do { quit; } else { }3Thiago Adams
4 Apr 25 ii`* Re: do { quit; } else { }2Kaz Kylheku
4 Apr 25 ii `- Re: do { quit; } else { }1Chris M. Thomasson
4 Apr 25 i+* Re: do { quit; } else { }4Kaz Kylheku
4 Apr 25 ii+* Re: do { quit; } else { }2Thiago Adams
4 Apr 25 iii`- Re: do { quit; } else { }1Thiago Adams
8 Apr 25 ii`- Re: do { quit; } else { }1candycanearter07
5 Apr 25 i`* Re: do { quit; } else { }3Janis Papanagnou
5 Apr 25 i +- Re: do { quit; } else { }1Janis Papanagnou
6 Apr 25 i `- Re: do { quit; } else { }1Michael S
4 Apr 25 +* Re: do { quit; } else { }608Tim Rentsch
4 Apr 25 i`* Re: do { quit; } else { }607Thiago Adams
6 Apr 25 i +* Re: do { quit; } else { }600Tim Rentsch
6 Apr 25 i i+* Re: do { quit; } else { }550Michael S
6 Apr 25 i ii`* Re: do { quit; } else { }549Tim Rentsch
6 Apr 25 i ii `* Re: do { quit; } else { }548Michael S
7 Apr 25 i ii  `* Re: do { quit; } else { }547Tim Rentsch
7 Apr 25 i ii   `* Re: do { quit; } else { }546Michael S
7 Apr 25 i ii    +* Re: do { quit; } else { }542bart
8 Apr 25 i ii    i`* Re: do { quit; } else { }541David Brown
8 Apr 25 i ii    i `* Re: do { quit; } else { }540bart
8 Apr 25 i ii    i  +* Re: do { quit; } else { }535David Brown
8 Apr 25 i ii    i  i`* Re: do { quit; } else { }534bart
8 Apr 25 i ii    i  i +* Re: do { quit; } else { }78Tim Rentsch
8 Apr 25 i ii    i  i i`* Re: do { quit; } else { }77bart
8 Apr 25 i ii    i  i i +* Re: do { quit; } else { }74Tim Rentsch
8 Apr 25 i ii    i  i i i`* Re: do { quit; } else { }73bart
9 Apr 25 i ii    i  i i i `* Re: do { quit; } else { }72Tim Rentsch
9 Apr 25 i ii    i  i i i  `* Re: do { quit; } else { }71bart
9 Apr 25 i ii    i  i i i   +- Re: do { quit; } else { }1Chris M. Thomasson
9 Apr 25 i ii    i  i i i   +- Re: do { quit; } else { }1Chris M. Thomasson
9 Apr 25 i ii    i  i i i   `* Re: do { quit; } else { }68Tim Rentsch
10 Apr 25 i ii    i  i i i    +* Re: do { quit; } else { }63bart
10 Apr 25 i ii    i  i i i    i+* Re: do { quit; } else { }61Kaz Kylheku
10 Apr 25 i ii    i  i i i    ii+* Re: do { quit; } else { }2Michael S
10 Apr 25 i ii    i  i i i    iii`- Re: do { quit; } else { }1Kaz Kylheku
10 Apr 25 i ii    i  i i i    ii`* Re: do { quit; } else { }58bart
10 Apr 25 i ii    i  i i i    ii +* Re: do { quit; } else { }43Keith Thompson
10 Apr 25 i ii    i  i i i    ii i+* Re: do { quit; } else { }39bart
10 Apr 25 i ii    i  i i i    ii ii+* Re: Endless complaints [was Re: do { quit; } else { }]16bart
10 Apr 25 i ii    i  i i i    ii iii+* Re: Endless complaints [was Re: do { quit; } else { }]14Janis Papanagnou
11 Apr 25 i ii    i  i i i    ii iiii`* Re: Endless complaints [was Re: do { quit; } else { }]13bart
11 Apr 25 i ii    i  i i i    ii iiii +- Re: Endless complaints [was Re: do { quit; } else { }]1Keith Thompson
11 Apr 25 i ii    i  i i i    ii iiii +- Re: Endless complaints [was Re: do { quit; } else { }]1Kaz Kylheku
11 Apr 25 i ii    i  i i i    ii iiii `* Re: Endless complaints [was Re: do { quit; } else { }]10David Brown
11 Apr 25 i ii    i  i i i    ii iiii  `* Re: Endless complaints [was Re: do { quit; } else { }]9bart
11 Apr 25 i ii    i  i i i    ii iiii   +* Re: Endless complaints [was Re: do { quit; } else { }]5Michael S
11 Apr 25 i ii    i  i i i    ii iiii   i`* Re: Endless complaints [was Re: do { quit; } else { }]4bart
11 Apr 25 i ii    i  i i i    ii iiii   i `* Re: Endless complaints [was Re: do { quit; } else { }]3Michael S
11 Apr 25 i ii    i  i i i    ii iiii   i  +- Re: Endless complaints [was Re: do { quit; } else { }]1Janis Papanagnou
11 Apr 25 i ii    i  i i i    ii iiii   i  `- Re: Endless complaints [was Re: do { quit; } else { }]1bart
11 Apr 25 i ii    i  i i i    ii iiii   +- Re: Endless complaints [was Re: do { quit; } else { }]1David Brown
11 Apr 25 i ii    i  i i i    ii iiii   +- Re: Endless complaints1Tim Rentsch
11 Apr 25 i ii    i  i i i    ii iiii   `- Re: Endless complaints [was Re: do { quit; } else { }]1Keith Thompson
10 Apr 25 i ii    i  i i i    ii iii`- Re: Endless complaints [was Re: do { quit; } else { }]1Keith Thompson
10 Apr 25 i ii    i  i i i    ii ii`* Re: do { quit; } else { }22Keith Thompson
11 Apr 25 i ii    i  i i i    ii ii `* Re: do { quit; } else { }21bart
11 Apr 25 i ii    i  i i i    ii ii  `* Re: do { quit; } else { }20Keith Thompson
11 Apr 25 i ii    i  i i i    ii ii   `* Re: do { quit; } else { }19Michael S
11 Apr 25 i ii    i  i i i    ii ii    +- Re: do { quit; } else { }1David Brown
11 Apr 25 i ii    i  i i i    ii ii    +* Re: do { quit; } else { }16Kaz Kylheku
11 Apr 25 i ii    i  i i i    ii ii    i+* Re: do { quit; } else { }2bart
11 Apr 25 i ii    i  i i i    ii ii    ii`- Re: do { quit; } else { }1Keith Thompson
13 Apr 25 i ii    i  i i i    ii ii    i`* Re: do { quit; } else { }13Michael S
12 May 25 i ii    i  i i i    ii ii    i `* Re: do { quit; } else { }12Tim Rentsch
12 May 25 i ii    i  i i i    ii ii    i  `* Re: do { quit; } else { }11David Brown
12 May 25 i ii    i  i i i    ii ii    i   `* Re: do { quit; } else { }10Keith Thompson
13 May 25 i ii    i  i i i    ii ii    i    `* Re: do { quit; } else { }9David Brown
14 May 25 i ii    i  i i i    ii ii    i     `* Re: do { quit; } else { }8James Kuyper
14 May 25 i ii    i  i i i    ii ii    i      +* Re: do { quit; } else { }6Keith Thompson
14 May 25 i ii    i  i i i    ii ii    i      i+* Re: do { quit; } else { }4James Kuyper
14 May 25 i ii    i  i i i    ii ii    i      ii`* Re: do { quit; } else { }3David Brown
14 May 25 i ii    i  i i i    ii ii    i      ii +- Re: do { quit; } else { }1Kaz Kylheku
15 May 25 i ii    i  i i i    ii ii    i      ii `- Re: do { quit; } else { }1James Kuyper
14 May 25 i ii    i  i i i    ii ii    i      i`- Re: do { quit; } else { }1David Brown
14 May 25 i ii    i  i i i    ii ii    i      `- Re: do { quit; } else { }1Tim Rentsch
11 Apr 25 i ii    i  i i i    ii ii    `- Re: do { quit; } else { }1Keith Thompson
6 May 25 i ii    i  i i i    ii i`* Re: do { quit; } else { }3Tim Rentsch
6 May 25 i ii    i  i i i    ii i `* Re: do { quit; } else { }2Keith Thompson
6 May 25 i ii    i  i i i    ii i  `- Re: do { quit; } else { }1Tim Rentsch
10 Apr 25 i ii    i  i i i    ii `* Re: do { quit; } else { }14Kaz Kylheku
10 Apr 25 i ii    i  i i i    ii  +* Re: do { quit; } else { }11bart
10 Apr 25 i ii    i  i i i    ii  i+* Re: do { quit; } else { }2Kaz Kylheku
11 Apr 25 i ii    i  i i i    ii  ii`- Re: do { quit; } else { }1bart
11 Apr 25 i ii    i  i i i    ii  i+* Re: do { quit; } else { }6Tim Rentsch
11 Apr 25 i ii    i  i i i    ii  ii`* Re: do { quit; } else { }5Keith Thompson
11 Apr 25 i ii    i  i i i    ii  ii `* Re: do { quit; } else { }4Tim Rentsch
11 Apr 25 i ii    i  i i i    ii  ii  `* Re: do { quit; } else { }3Keith Thompson
11 Apr 25 i ii    i  i i i    ii  ii   +- Re: do { quit; } else { }1bart
5 May 25 i ii    i  i i i    ii  ii   `- Re: do { quit; } else { }1Tim Rentsch
11 Apr 25 i ii    i  i i i    ii  i+- Re: do { quit; } else { }1Keith Thompson
11 Apr 25 i ii    i  i i i    ii  i`- Re: do { quit; } else { }1Keith Thompson
10 Apr 25 i ii    i  i i i    ii  +- Re: do { quit; } else { }1bart
10 Apr 25 i ii    i  i i i    ii  `- Re: do { quit; } else { }1Kaz Kylheku
11 Apr 25 i ii    i  i i i    i`- Re: do { quit; } else { }1Tim Rentsch
9 May 25 i ii    i  i i i    `* Re: do { quit; } else { }4Bonita Montero
9 May 25 i ii    i  i i i     `* Re: do { quit; } else { }3Richard Heathfield
9 Apr 25 i ii    i  i i +- Re: do { quit; } else { }1Richard Damon
9 Apr 25 i ii    i  i i `- Re: do { quit; } else { }1David Brown
9 Apr 25 i ii    i  i `* Re: do { quit; } else { }455David Brown
8 Apr 25 i ii    i  +- Re: do { quit; } else { }1Tim Rentsch
9 Apr 25 i ii    i  `* Re: do { quit; } else { }3Ike Naar
8 Apr 25 i ii    `* Re: do { quit; } else { }3Tim Rentsch
6 Apr 25 i i`* Re: do { quit; } else { }49Michael S
7 May 25 i `* Re: do { quit; } else { }6Wuns Haerst
6 Apr 25 +- Re: do { quit; } else { }1Lawrence D'Oliveiro
6 Apr 25 +- Re: do { quit; } else { }1David Brown
18 Apr 25 `- Re: do { quit; } else { }1Mikko

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal