Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Passing float args incorrectly in non-protyped functions. #5

Open
pathdb opened this Issue May 21, 2011 · 0 comments

Comments

Projects
None yet
1 participant
Collaborator

pathdb commented May 21, 2011

int t_float_values (float_arg1, float_arg2)
float float_arg1, float_arg2;
{
return ((float_arg1 - float_val1) < DELTA
&& (float_arg1 - float_val1) > -DELTA
&& (float_arg2 - float_val2) < DELTA
&& (float_arg2 - float_val2) > -DELTA);
}

pathdb> FAIL: gdb.base/callfuncs.exp: p t_float_values(3.14159,-2.3765)
$23 = 0^M
pathdb> FAIL: gdb.base/callfuncs.exp: p t_float_values(float_val1,float_val2)
$24 = 0^M
pathdb> FAIL: gdb.base/callfuncs.exp: p t_float_values(3.14159,float_val2)
$25 = 0^M
pathdb> FAIL: gdb.base/callfuncs.exp: p t_float_values(float_val1,-2.3765)
$26 = 0

It is expected to return 1. Looks like they are about promotion from float to double in non-prototyped functions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment