This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA:] Fix two uninitialized-bugs in cppexp.c spotted byvalgrind


Hans-Peter Nilsson <hp@bitrange.com> writes:

> 	* cppexp.c (num_part_mul): Initialize result.unsignedp, to 1.
> 	(eval_token): Initialize temp.
...
>       default: /* CPP_HASH */
> +       /* For recovery, an erroneous assertion expression is handled as a
> + 	 failing assertion.  */
> +       temp = 0;
>         _cpp_test_assertion (pfile, &temp);

Please address this by making _cpp_test_assertion always store a value
into its second argument, instead.  A patch to do that is pre-approved.

>     result.high += HIGH_PART (middle[0]);
>     result.high += HIGH_PART (middle[1]);
> +   result.unsignedp = 1;

This piece is fine.

zw


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]