Liste des Groupes | Revenir à cl c |
On 2025-04-11, Michael S <already5chosen@yahoo.com> wrote:What about struct {long x;} and struct {int64_t x;}?On Thu, 10 Apr 2025 17:59:15 -0700so struct { long x; } and struct { int x; } are compatible enough,
Keith Thompson <Keith.S.Thompson+u@gmail.com> wrote:
>>>
An understanding of what "compatible types" means.
Bart didn't say that types are compatible or non-compatible.
He said that they are 'compatible enough'. That is not terminology of C
Standard, but terminology of his own. And he seems to understand it.
>
In my own translation, 'compatible enough' means that when these structs
are accessed then any sane or even semi-sane compiler will generate code
that will have the same effect as in case of access through structures
with literally identical declarations.
in situations that are portable enough.
Les messages affichés proviennent d'usenet.