[vox-tech] complex C question

Micah Cowan vox-tech@lists.lugod.org
Fri, 18 Jan 2002 11:41:46 -0800


On Thu, Jan 17, 2002 at 08:25:57PM -0800, Peter Jay Salzman wrote:
> i'm not sure if anyone here has been playing around with tgmath.h, but
> here it goes:
> 
>    #include <tgmath.h>
>    int main(void)
>    {
>    	long double complex a;
>    	a = 4.0L + I*2.0L;
>    	return 0;
>    }
> 
> does gdb not have support for tgmath or am i trying to print a complex
> number in the wrong manner?
> 
>    (gdb) ptype a
>    type = complex long double
>    (gdb) print a
>    $2 = Invalid C/C++ type code 20 in symbol table.
>    (gdb) printf "%Le,%Le\n", a
>    Wrong number of arguments for specified format-string
>    (gdb) printf "%Le\n", a
>    Value can't be converted to integer.
>    (gdb) quit
> 
> pete

What version gdb are you using?  I have 5.1.  I can't really test your
code because my work machine doesn't have the latest glibc.

Micah