RE: [Dev-C++] #DEFINE versus cont variables in array inicializations
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Ioannis V. <iv...@te...> - 2003-05-30 16:38:51
|
> -----Original Message----- > From: Per Westermark [mailto:pw...@ia...] > Sent: Friday, May 30, 2003 2:39 PM > To: Ioannis Vranos > Cc: Dev-C++ Mailing List > Subject: RE: [Dev-C++] #DEFINE versus cont variables in array > inicializations > > > If the reference is declared auto, the compiler can optimize away the > reference, but if it's declared as a global, the compiler > won't optimize > it away, since by definition, a reference - just like a > pointer - is an > address to a value, not the value itself. Yes I agree. I was talking about local auto const references. Global const variables are difficult to optimise out too, because the compiler doesn't know if it is used in another compilation unit (file). Ioannis Vranos * Programming pages: http://www.noicys.freeurl.com * Alternative URL 1: http://run.to/noicys * Alternative URL 2: http://www.noicys.cjb.net |