home bbs files messages ]

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

   comp.lang.c++.moderated      Moderated discussion of C++ superhackery      33,346 messages   

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

   Message 32,454 of 33,346   
   Dave Abrahams to All   
   Re: Standard Versus Non-Standard C++   
   04 Jul 12 21:22:07   
   
   From: dave@boostpro.com   
      
   on Mon Jul 02 2012, Le Chaud Lapin  wrote:   
      
   > On Sunday, July 1, 2012 7:15:45 AM UTC-5, Zeljko Vrba wrote:   
   >> { Please avoid useless quotes, but do provide the minimum   
   >>    necessary to establish context -mod }   
   >> On 2012-07-01, Le Chaud Lapin wrote:   
   >   
   >> Also, a question for you: many C++ projects can be compiled with   
   >> MSVC and GCC, i.e., they are syntactically correct ISO C++   
   >> programs.  Yet, they rely on behavior that is UB according to the   
   >> standard, but which both compilers define in a useful way.  Since   
   >> code exhibiting UB at run-time is technically not "valid C++ code",   
   >> should the authors of such projects be allowed to say that they are   
   >> coding in C++?   
   >   
   > Because such UB code would be, in fact, valid C++. About this code,   
   > the standard would say: "This code is will be compiled by a   
   > conforming compiler, but the behavior would be undefined.   
      
   Actually, it would say "undefined behavior; no diagnostic required."   
   When code has undefined behavior, the compiler is free to diagnose it   
   as soon as it can, including at runtime or even at compile-time.  It's   
   just that in some cases, the standard either can't or doesn't mandate   
   such diagnosis.   
      
   Cheerily,   
      
   --   
   Dave Abrahams   
   BoostPro Computing   
   http://www.boostpro.com   
      
      
         [ See http://www.gotw.ca/resources/clcm.htm for info about ]   
         [ comp.lang.c++.moderated.    First time posters: Do this! ]   
      
   --- 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