math.h compile error (gcc-2.95.3 + newlib-1.11.0)

Toralf Lund toralf@procaptura.com
Tue Sep 16 16:33:00 GMT 2003


Dan Kegel wrote:

> Toralf Lund wrote:
>
>> I'm now actually down to one error message for my port to gcc cross 
>> compiler ;-) In the C code, that is; some of the assembler still 
>> needs to be changed.
>>
>> Anyhow, I get:
>>
>> In file included from track.c:44:
>> /usr/lib/gcc-lib/m68k-coff/2.95.3/../../../../m68k-coff/include/math.h:26: 
>> syntax error before `union'
>>
>> extern __IMPORT const union __dmath __infinity[];
>
>
> Can you whittle this down to a minimal test case, then post the 
> preprocessed
> source?  Maybe __IMPORT is expanding to something broken...

I get the same problem with a file tst_math.c only containing '#include 
<math.h>':

% m68k-coff-gcc -traditional -fno-builtin -m68000 -c -o tst_math.o 
tst_math.c
In file included from tst_math.c:1:
/usr/lib/gcc-lib/m68k-coff/2.95.3/../../../../m68k-coff/include/math.h:26: 
syntax error before `union'
/usr/lib/gcc-lib/m68k-coff/2.95.3/../../../../m68k-coff/include/math.h:26: 
warning: array `__infinity' assumed to have one element

The C file and the output from
m68k-coff-gcc -traditional -fno-builtin -m68000 -E -P -o tst_math.i 
tst_math.c

are included.

Actually, "-traditional" seems to be the problem. I'm wondering if I can 
make do without it (my code is not ANSI compliant.)

- Toralf

-------------- next part --------------
A non-text attachment was scrubbed...
Name: tst_math.c
Type: text/x-c
Size: 18 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/crossgcc/attachments/20030916/e8104348/attachment.bin>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: tst_math.i
URL: <http://sourceware.org/pipermail/crossgcc/attachments/20030916/e8104348/attachment.ksh>
-------------- next part --------------
------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com


More information about the crossgcc mailing list