This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [_Complex test 1/4] support_complex_tests in gdb.exp and pass _Complex args to func
>>>>> "Yao" == Yao Qi <yao@codesourcery.com> writes:
Yao> This is a good idea. Done this in new patch.
Thanks for doing this.
Yao> +#ifdef PROTOTYPES
Yao> +void callca (float _Complex f1, float _Complex f2, float _Complex f3)
Yao> +#else
Yao> +callca (f1, f2, f3)
Yao> +float _Complex f1; float _Complex f2; float _Complex f3;
Yao> +#endif
I would not worry about the no PROTOTYPES case. You can leave this in
if you want though.
Yao> +set compile_flags {debug nowarnings quiet}
Yao> +if [support_complex_tests] {
Yao> + set compile_flags "$compile_flags additional_flags=-DTEST_COMPLEX"
I think it is better to use lappend here.
Yao> + gdb_breakpoint callca;
Yao> + gdb_breakpoint callcb;
Yao> + gdb_breakpoint callcc;
Yao> + gdb_breakpoint callcd;
Yao> + gdb_breakpoint callce;
Yao> + gdb_breakpoint callcf;
These ";"s are not needed. There are a few instances of this.
Yao> +# Return a 1 if we should run tests to _Complex types, otherwise, skip it.
Just "Return 1 if...", and then ", otherwise 0.".
I am curious if you tested this in some situation where the complex
tests are skipped.
Tom