This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libfortran/40863] [4.5 Regression] Build failure in libgfortran



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]