This is the mail archive of the
mailing list for the GCC project.
Use of typeof
- From: Philip Cheng <cheng at PCIgeomatics dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: Fri, 1 Mar 2002 11:01:18 -0500 (EST)
- Subject: Use of typeof
I would like to use typeof to determine the type of a variable.
However, I keep getting the error when I try to compile the program.
test.c: In function `main':
test.c:8: parse error before "typeof"
Anyone knows how can I solve the problem? Thanks in advance for your help.
Here is my test program:
dftest = 1.0;
if (__builtin_types_compatible_p (typeof (dftest), double))
printf("It is double\n");