From: antispam@fricas.org   
      
   David Brown wrote:   
   > On 01/12/2025 15:41, bart wrote:   
   >> On 01/12/2025 04:10, Waldek Hebisch wrote:   
   >   
   > C - like many languages - has a variety of types for different purposes,   
   > and with different combinations of characteristics. Some separate types   
   > share one or more of these characteristics. Characteristics of types   
   > include whether they hold integers, floating point values, or pointers,   
   > whether they are signed or unsigned, what implicit conversions take   
   > place and in what circumstances, what size their bit representation is,   
   > what range they cover, what operations can be applied, and so on.   
   >   
   > Just because two types happen to share the same size in bytes does not   
   > in any way imply they are, or should be, the same type. Even if they   
   > have many characteristics in common, they can still be different types.   
   >   
   > And even when they are /actually/ the same type - such as when one is a   
   > typedef of another - it is not difficult to keep them separate in code   
   > and use the appropriate type for appropriate use. "size_t" will   
   > typically be a typedef for "unsigned long long int", "unsigned long   
   > int", or "unsigned int" - but you don't mix it with those types.   
   >   
   > If you had been paying attention in this thread, you /would/ find it   
   > immediately obvious why "uint8_t" and "_BitInt(8)" /must/ be different   
   > types. And if you had a basic understanding of the way the language   
   > works (rather than just a superficial idea of how some of it can be   
   > used), you'd understand that these would be different types even if they   
   > followed the same integer promotion rules.   
      
   I see nothing in the standard that prevents '_BitInt(64)' and 'long'   
   to be the same type. And AFICS promotion rules are the only thing   
   which prevents 'uint8_t' and '_BitInt(8)' to be the same type.   
   Maybe I missed something, but I have read posts that appeared here   
   and I saw nothing indicating otherwise.   
      
   --   
    Waldek Hebisch   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|