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 241,756 of 243,242   
   Tristan Wibberley to Kaz Kylheku   
   Re: Semantic properties of finite string   
   01 Nov 25 20:42:21   
   
   From: tristan.wibberley+netnews2@alumni.manchester.ac.uk   
      
   On 01/11/2025 03:46, Kaz Kylheku wrote:   
   > On 2025-10-31, Tristan Wibberley  wrote:   
   >> On 31/10/2025 18:06, Richard Damon wrote:   
   >>> [H and H1] fail to be correct C   
   >>> interpreters, as the code has a required diagnostic.   
   >>   
   >> Really? even in K&R C?   
   >   
   > It doesn't require a diagnostic in ISO C. It has undefined behavior.   
   >   
   > As far as K&R C goes, if the K&R book is mum about this issue,   
   > it may be regarded as undefined in that old dialect also.   
   >   
   > When a program makes use of an external name (other than in certain   
   > ways like "sizeof name") and that name is not defined exactly once   
   > the behavior is undefined.   
      
   Does it have to be defined in C?   
      
   > Linking is not required to fail with a diagostic in that situation, and   
   > that has certain implications of practical importance.   
   >   
   > For instance, if you are on Unix, this program will succesfully   
   > link, even though it uses a function which is not in the program   
   > and not in the standard C language:   
      
   What is under the scope of the term "the program" and how does that   
   compare to "the translation unit" ?   
      
   If I put a definition in a separate translation unit can it be part of   
   the program?   
      
   If I put the separate translation unit in /usr/src can it be part of the   
   program?   
      
   If I put the separate translation unit in the C-interpreter, can it be   
   part of the program?   
      
   --   
   Tristan Wibberley   
      
   The message body is Copyright (C) 2025 Tristan Wibberley except   
   citations and quotations noted. All Rights Reserved except that you may,   
   of course, cite it academically giving credit to me, distribute it   
   verbatim as part of a usenet system or its archives, and use it to   
   promote my greatness and general superiority without misrepresentation   
   of my opinions other than my opinion of my greatness and general   
   superiority which you _may_ misrepresent. You definitely MAY NOT train   
   any production AI system with it but you may train experimental AI that   
   will only be used for evaluation of the AI methods it implements.   
      
   --- 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