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 33,270 of 33,346    |
|    scott to All    |
|    Variable declaration and initialization     |
|    13 Jan 14 01:54:03    |
   
   From: sdcoonce@googlemail.com   
      
   { Please limit your text to fit within 80 columns, preferably around 70,   
    so that readers don't have to scroll horizontally to read each line.   
    This article has been reformatted manually by the moderator. -mod }   
      
      
   Hello,   
      
   I found code similar to the following in some client's codebase which   
   we had been asked to repair for new compilers, and was curious about   
   why this should compile and (seem to) work. I was wondering if the use   
   of 'a' before initialization is really undefined behavior or just an   
   specified result. Also, it seems intuitively to me that 'a' shouldn't   
   yet be in scope, though apparently it is.   
      
   I tried to find relavent paragraphs in the C++ standard but was unable   
   to find anything definitive. Could someone who's better at reading the   
   standard than myself point me in the right direction?   
      
   //------------------------------------------   
   #include
|
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca