Commit 2402645b by Hans-Peter Nilsson Committed by Hans-Peter Nilsson

cpplib.c (_cpp_test_assertion): Default *value to 0.

	* cpplib.c (_cpp_test_assertion): Default *value to 0.

	* cppexp.c (num_part_mul): Initialize result.unsignedp, to 1.

From-SVN: r59648
parent f6a83eb0
2002-11-29 Hans-Peter Nilsson <hp@bitrange.com>
* cpplib.c (_cpp_test_assertion): Default *value to 0.
* cppexp.c (num_part_mul): Initialize result.unsignedp, to 1.
2002-11-29 Ulrich Weigand <uweigand@de.ibm.com>
* config/s390/t-crtstuff: New target makefile fragment.
......
......@@ -1446,6 +1446,7 @@ num_part_mul (lhs, rhs)
result.high += HIGH_PART (middle[0]);
result.high += HIGH_PART (middle[1]);
result.unsignedp = 1;
return result;
}
......
......@@ -1689,7 +1689,7 @@ find_answer (node, candidate)
/* Test an assertion within a preprocessor conditional. Returns
nonzero on failure, zero on success. On success, the result of
the test is written into VALUE. */
the test is written into VALUE, otherwise the value 0. */
int
_cpp_test_assertion (pfile, value)
cpp_reader *pfile;
......@@ -1699,6 +1699,11 @@ _cpp_test_assertion (pfile, value)
cpp_hashnode *node;
node = parse_assertion (pfile, &answer, T_IF);
/* For recovery, an erroneous assertion expression is handled as a
failing assertion. */
*value = 0;
if (node)
*value = (node->type == NT_ASSERTION &&
(answer == 0 || *find_answer (node, answer) != 0));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment