Skip to content

Commit

Permalink
Replace use of __null with NULL and bitwise xor was replaced using lo…
Browse files Browse the repository at this point in the history
…gical xor and fixed edgRose.C to comile when configured using --enable-microsoft-extensions configure option.
  • Loading branch information
Daniel J. Quinlan committed Apr 21, 2016
1 parent bc1bf0b commit 90d1484
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 3 deletions.
4 changes: 4 additions & 0 deletions README.git
Expand Up @@ -992,3 +992,7 @@ Compiling ROSE with Intel compiler:
After new desktop machine:
smgit commit -am "Fixes for Intel compiler and GNU g++ version 4.8.3, also fixed to pass policy tests."
smgit push origin HEAD:dquinlan/dq-development-dev

Debugging ROSE Matrix Testing errors using rmc build VMs:
"rmc" to testup the environment
"rmc config" to kick-off the configure, make, make check process.
2 changes: 1 addition & 1 deletion src/frontend/CxxFrontend/EDG
Submodule EDG updated from f2edf4 to 82bf72
5 changes: 4 additions & 1 deletion src/frontend/SageIII/fixupCopy_scopes.C
Expand Up @@ -143,7 +143,10 @@ SgInitializedName::fixupCopy_scopes(SgNode* copy, SgCopyHelp & help) const
// Need to fixup the scope and perhaps build the SgVariableDefinition object!
SgInitializedName* initializedName_copy = isSgInitializedName(copy);
ROSE_ASSERT(initializedName_copy != NULL);
ROSE_ASSERT (initializedName_copy->get_declptr() != __null);

// DQ (4/21/2016): Replacing "__null" with more portable (non-gnu specific) use using "NULL".
// ROSE_ASSERT (initializedName_copy->get_declptr() != __null);
ROSE_ASSERT (initializedName_copy->get_declptr() != NULL);

// fprintf(stderr, "SgInitializedName::fixupCopy_scopes(%p) this=%p\n", copy, this);
// fprintf(stderr, "Copy's scope is %p, my scope is %p\n", initializedName_copy->get_scope(), this->get_scope());
Expand Down
8 changes: 7 additions & 1 deletion src/frontend/SageIII/sageInterface/sageInterface.C
Expand Up @@ -19443,7 +19443,13 @@ bool SageInterface::getForLoopInformations(
SgVarRefExp * rhs_var_ref = isSgVarRefExp(rhs_exp);
bool rhs_it = (rhs_var_ref != NULL) && (rhs_var_ref->get_symbol() == iterator);

assert(lhs_it xor rhs_it);
// DQ (4/21/2016): Replacing use of bitwise xor with something more approriate for logical types.
// Note that the xor logica operator does not exist in C/C++ and that this is a case of using the
// bitwise xor operator on boolean values (not a great idea). Note that logical "a xor b" is
// equivalent to "!a != !b" the use of "!" only make sure that the "!=" is applied to a boolean
// value. Since these are boolean typed values we can use "a != b", directly.
// assert(lhs_it xor rhs_it);
assert(lhs_it != rhs_it);

upper_bound = lhs_it ? bin_test->get_rhs_operand_i() : bin_test->get_lhs_operand_i();

Expand Down

0 comments on commit 90d1484

Please sign in to comment.