This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libfortran/40863] [4.5 Regression] Build failure in libgfortran
- From: "burnus at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 26 Jul 2009 20:28:39 -0000
- Subject: [Bug libfortran/40863] [4.5 Regression] Build failure in libgfortran
- References: <bug-40863-10391@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #6 from burnus at gcc dot gnu dot org 2009-07-26 20:28 -------
(In reply to comment #4)
> The prototype warnings have been there foreever.
They should be fixed with the patch ... Do they still appear?
> On hpux, the error
> appears as a result of your change:
> ../../../gcc/libgfortran/intrinsics/c99_functions.c: In function 'casin':
> ../../../gcc/libgfortran/intrinsics/c99_functions.c:1433:11: error: 'I'
> undeclared (first use in this function)
Hmm. Do you know how the macro is called which provides "I", where I*I = -1?
On a POSIX/C99 system one has:
The <complex.h> header shall define the following macros:
complex
Expands to _Complex.
_Complex_I
Expands to a constant expression of type const float _Complex,
with the value of the imaginary unit (that is, a number i such
that i**2=-1).
imaginary
Expands to _Imaginary.
_Imaginary_I
Expands to a constant expression of type const float _Imaginary
with the value of the imaginary unit.
I Expands to either _Imaginary_I or _Complex_I. If _Imaginary_I
is not defined, I expands to _Complex_I.
Which of those macros are defined on hppa2.0w-hp-hpux11.11 and on Cygwin ?
Seemingly not the last one ...
Can you try whether the following works (place somewhere in
intrinsics/c99_functions.c):
#ifndef I
# if defined(_Imaginary_I)
# define I _Imaginary_I
# elif defined(_Complex_I)
# define I _Complex_I
# endif
#endif
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40863