home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.c      Meh, in C you gotta define EVERYTHING      243,242 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 242,307 of 243,242   
   Keith Thompson to Waldek Hebisch   
   Re: _BitInt(N)   
   01 Dec 25 18:21:00   
   
   From: Keith.S.Thompson+u@gmail.com   
      
   antispam@fricas.org (Waldek Hebisch) writes:   
   [...]   
   > 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.   
      
   My initial reaction is that *obviously* _BitInt(64) and long are   
   distinct types.  But what's obvious isn't always true.   
      
   Nevertheless ...   
      
   Looking through N3220 6.2.5 (Types), it specifies several groups of   
   types: standard signed integer types, bit-precise signed integer   
   type, extended signed integer types, and their corresponding   
   unsigned types.  It's "obvious" that these sets are meant to be   
   disjoint, but it doesn't actually say so.   
      
   But section 6.3.1.1 defines the concept of *integer conversion rank*.   
   In particular :   
      
       The rank of any standard integer type shall be greater than   
       the rank of any extended integer type with the same width or   
       bit-precise integer type with the same width.   
      
   So even if long has a width of 64 bits and exactly the same   
   representation as _BitInt(64), it has a greater integer conversion   
   rank, so it can't be the same type.   
      
   --   
   Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com   
   void Void(void) { Void(); } /* The recursive call of the void */   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca