compiler may optimize away X in "true || X"
authorGengbin Zheng <gzheng@illinois.edu>
Tue, 17 Apr 2012 22:11:19 +0000 (17:11 -0500)
committerGengbin Zheng <gzheng@illinois.edu>
Tue, 17 Apr 2012 22:11:19 +0000 (17:11 -0500)
but X must be executed.

src/ck-perf/trace-projections.C

index 227ac0bbadbac6bd93a8a5435d3acac2780ad4fd..17de54bccbc0015032f2cbefaa0bce4d746301a3 100644 (file)
@@ -1016,7 +1016,8 @@ TraceProjections::TraceProjections(char **argv):
 
 
 #if CMK_PROJECTIONS_USE_ZLIB
-  int compressed = true || CmiGetArgFlagDesc(argv,"+gz-trace","Write log files pre-compressed with gzip");
+  int compressed = true;
+  CmiGetArgFlagDesc(argv,"+gz-trace","Write log files pre-compressed with gzip");
   int disableCompressed = CmiGetArgFlagDesc(argv,"+no-gz-trace","Disable writing log files pre-compressed with gzip");
   compressed = compressed && !disableCompressed;
 #else