Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 24895 - glibc 2.2 has errors in tgmath.h
glibc 2.2 has errors in tgmath.h
Product: Red Hat Linux
Classification: Retired
Component: glibc (Show other bugs)
i386 Linux
medium Severity high
: ---
: ---
Assigned To: Jakub Jelinek
David Lawrence
Depends On:
  Show dependency treegraph
Reported: 2001-01-24 18:57 EST by Steve Lawler
Modified: 2016-11-24 10:03 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2001-01-25 12:10:49 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Steve Lawler 2001-01-24 18:57:19 EST
tgmath.h _does not_ work (causes compiler errors) with gcc-2.96-69 and
glibc-2.2-12.  It _does_ work with kgcc/egcs-1.1.12-40 and glibc-2.1.13,
and with kgcc/egcs-1.1.12-40 and glibc-2.2-12.  The following code, in
particular, will not work:

	#include <math.h>
	#include <stdlib.h>
	#include <tgmath.h>

	int main(int argc, char **argv)
		double x = atof(argv[1]);
		double a;

		a = cos(x);
		return !(a == 1.0);

	% gcc -Wall foo.c -o foo -lm
	foo.c: In function `main':
	foo.c:10: parse error before `{'
	foo.c:10: parse error before `else'
	% kgcc -Wall foo.c -o foo -lm
	% if ./foo 0.0 ; then echo hi ; fi
Comment 1 Jakub Jelinek 2001-01-25 12:08:57 EST
This has actually nothing to do with gcc (kgcc succeeds to compile it only
because it picks tgmath.h from glibc 2.1.3 compatibility headers, if you pass
-I/usr/include to kgcc it will fail the same way).
I've submitted a patch for this
hope this will get resolved soon.
Comment 2 Jakub Jelinek 2001-02-12 04:49:03 EST
This should be fixed in glibc-2.2.1-7. In addition to this, you probably
want cpp-2.96-74 and above, since otherwise some macros from tgmath.h might
be preprocessed wrongly (namely, if one uses some particular tgmath.h macros
as arguments to other tgmath.h macros).

Note You need to log in before you can comment on or make changes to this bug.