From: Keith.S.Thompson+u@gmail.com   
      
   Tim Rentsch writes:   
   > Keith Thompson writes:   
   >> Thiago Adams writes:   
   >>> Em 19/12/2025 09:15, Keith Thompson escreveu:   
   >> [...]   
   >>   
   >>>> gcc's warning for 18408377700990114895 (which is slightly smaller   
   >>>> than 2**64) is "integer constant is so large that it is unsigned".   
   >>>> This is *incorrect* (and I think it's been reported as a bug), but   
   >>>> the incorrect wording of the warning is not a conformance issue.   
   >>>   
   >>> I am not understating why do you think this is a bug?   
   >>> Because it should not compile?   
   >>   
   >> No, because the message is factually incorrect.   
   >   
   > No, it isn't. The message might be misleading but it isn't wrong.   
   >   
   >> The integer constant 18408377700990114895 is not of any unsigned type.   
   >   
   > The message doesn't say the constant has an unsigned type. It says   
   > only that the constant is unsigned.   
      
   What distinction are you making?   
      
   All integer constants are "unsigned" in the sense that they don't   
   include a sign. -1 is an expression, not a constant. That's not   
   what the message means.   
      
   I see no reasonable interpretation of "integer constant is so   
   large that it is unsigned" other than that it's of an unsigned type   
   because it's too large.   
      
   The message correctly reflects the C90 semantics, where a   
   sufficiently large unsuffixed decimal integer constant is of type   
   unsigned long. But in C99 and later, an unsuffixed decimal integer   
   constant is never of any unsigned 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)   
|