Click here to Skip to main content
15,917,709 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Macro expansion porting from UNIX Pin
Michael Dunn26-Jan-02 6:44
sitebuilderMichael Dunn26-Jan-02 6:44 
GeneralRe: Macro expansion porting from UNIX Pin
Martijn26-Jan-02 12:15
Martijn26-Jan-02 12:15 
GeneralRe: Macro expansion porting from UNIX Pin
Rick York26-Jan-02 12:38
mveRick York26-Jan-02 12:38 
GeneralRe: Macro expansion porting from UNIX Pin
Martijn27-Jan-02 0:46
Martijn27-Jan-02 0:46 
GeneralRe: Macro expansion porting from UNIX Pin
Michael Dunn26-Jan-02 15:22
sitebuilderMichael Dunn26-Jan-02 15:22 
GeneralRe: Macro expansion porting from UNIX Pin
Matt Gullett26-Jan-02 15:56
Matt Gullett26-Jan-02 15:56 
GeneralRe: Macro expansion porting from UNIX Pin
Martijn27-Jan-02 0:46
Martijn27-Jan-02 0:46 
GeneralCompiler optimizations and evaluation order Pin
valtrig26-Jan-02 0:01
valtrig26-Jan-02 0:01 
Hi people,
Does anyone know whether the order of evaluation of terms in an expression can be guaranteed by the C++ compiler to be the same as the order that these terms appear in the code? For example, consider the following:

bool A();
{
}

bool B();
{
}
...
if ( A() && B() )
{
....
}

Can I safely assume that, no matter what the optimization settings are, function A() will always be called before function B()?

Also, can I assume that if A() returns "false", then B() won't be called at all?

Does the same thing hold for inclusive OR?
(i.e. in the statement "if ( A() || B() )" will A() be called first and is B() going to be called anyway if A() returns "true"?)

Thanks very much for the help.
GeneralRe: Compiler optimizations and evaluation order Pin
Tim Deveaux26-Jan-02 4:29
Tim Deveaux26-Jan-02 4:29 
GeneralRe: Compiler optimizations and evaluation order Pin
Michael Dunn26-Jan-02 6:48
sitebuilderMichael Dunn26-Jan-02 6:48 
GeneralJust look at this. Pin
EdBond25-Jan-02 23:02
EdBond25-Jan-02 23:02 
GeneralRe: Just look at this. Pin
Nish Nishant25-Jan-02 23:07
sitebuilderNish Nishant25-Jan-02 23:07 
Generaluser login Pin
aleyah25-Jan-02 21:05
aleyah25-Jan-02 21:05 
GeneralRe: user login Pin
Nish Nishant25-Jan-02 22:02
sitebuilderNish Nishant25-Jan-02 22:02 
GeneralRe: user login Pin
Simon Walton26-Jan-02 0:17
Simon Walton26-Jan-02 0:17 
GeneralRe: user login Pin
aleyah26-Jan-02 4:31
aleyah26-Jan-02 4:31 
GeneralPrinter <i>Properties</i> Dialog Pin
Shog925-Jan-02 17:33
sitebuilderShog925-Jan-02 17:33 
Generali wanna mak program about BMP T.T Pin
25-Jan-02 16:48
suss25-Jan-02 16:48 
GeneralRe: i wanna mak program about BMP T.T Pin
alex.barylski25-Jan-02 22:53
alex.barylski25-Jan-02 22:53 
GeneralRelease Build Bugs and Multithreading Pin
Swinefeaster25-Jan-02 13:59
Swinefeaster25-Jan-02 13:59 
GeneralRe: Release Build Bugs and Multithreading Pin
Tim Smith25-Jan-02 14:30
Tim Smith25-Jan-02 14:30 
GeneralRe: Release Build Bugs and Multithreading Pin
Swinefeaster25-Jan-02 15:55
Swinefeaster25-Jan-02 15:55 
GeneralRe: Release Build Bugs and Multithreading Pin
Swinefeaster26-Jan-02 11:56
Swinefeaster26-Jan-02 11:56 
GeneralRe: Release Build Bugs and Multithreading Pin
Michael Dunn25-Jan-02 16:23
sitebuilderMichael Dunn25-Jan-02 16:23 
GeneralRe: Release Build Bugs and Multithreading Pin
Swinefeaster25-Jan-02 16:31
Swinefeaster25-Jan-02 16:31 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.