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,890 of 243,242   
   James Russell Kuyper Jr. to Tim Rentsch   
   Re: printf and time_t   
   07 Jan 26 12:58:38   
   
   From: jameskuyper@alumni.caltech.edu   
      
   On 2026-01-07 08:02, Tim Rentsch wrote:   
   > James Kuyper  writes:   
   >   
   >> On 2026-01-05 03:17, Andrey Tarasevich wrote:   
   ...   
   >>> You can't.  As far as the language is concerned, `time_t` is intended   
   >>> to be an opaque type.  It has to be a real type, ...   
   >>   
   >> In C99, it was only required to be an arithmetic type.  I pointed out   
   >> that this would permit it to be, for example, double _Imaginary. [...]   
   >   
   > It's hard to imagine how time_t being an imaginary type could   
   > provide the semantics described in the C standard for time_t.   
      
   You'll need to elaborate on that. time_t is an opaque type which could,   
   on one implementation, have been long double. Another implementation   
   could have stored the same value as the imaginary component of   
   _Imaginary long double, and could work with that value the same way as   
   the first one. It would be a perverse implementation, but I see no   
   serious obstacles to creating such an implementation. A good optimizer   
   might even generate exactly the same machine code from C source code for   
   the two implementations.   
      
   --- 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