It seems that tgmath.h is not available on Darwin:

$ gcc-dp-4.2 -std=gnu99 -Wall -o complex complex.c 
complex.c:3:20: error: tgmath.h: No such file or directory

$ gcc-dp-4.2 --version
gcc-dp-4.2 (GCC) 4.2.0 20060729 (experimental)

There is no file tgmath.h provided with the compiler that could be installed (I
checked revision 120754).  There is a file tgmath.h that ships as part of
libstdc++, but this is only a C++ wrapper.

tgmath.h exists in glibc, but my system does not use glibc.  Naively trying to
use this file leads to a syntax error on the line containing
#if __GNUC_PREREQ (2, 7)

I found a discussion on the gcc mailing list from August 2004 which discusses
this topic: <http://gcc.gnu.org/ml/gcc-patches/2004-08/msg00918.html>. 
Apparently there was a somewhat heated discussion on whether it would be useful
or appropriate to include tgmath.h with the compiler.

Since my operating system does not have a tgmath.h, I would like to argue that
gcc should "fixinclude" it by providing a fallback implementation.

By the way, <http://gcc.gnu.org/c99status.html> marks tgmath.h as "done".


-- 
           Summary: tgmath.h not found
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: schnetter at aei dot mpg dot de
 GCC build triplet: i386-apple-darwin8.7.1
  GCC host triplet: i386-apple-darwin8.7.1
GCC target triplet: i386-apple-darwin8.7.1


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30456

Reply via email to