kinds-override.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /* Header used to override things detected by the mk-kinds-h.sh script.
  2. Copyright (C) 2010-2015 Free Software Foundation, Inc.
  3. This file is part of the GNU Fortran runtime library (libgfortran).
  4. Libgfortran is free software; you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation; either version 3, or (at your option)
  7. any later version.
  8. Libgfortran is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU General Public License for more details.
  12. Under Section 7 of GPL version 3, you are granted additional
  13. permissions described in the GCC Runtime Library Exception, version
  14. 3.1, as published by the Free Software Foundation.
  15. You should have received a copy of the GNU General Public License and
  16. a copy of the GCC Runtime Library Exception along with this program;
  17. see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
  18. <http://www.gnu.org/licenses/>. */
  19. /* What are the C types corresponding to the real(kind=10) and
  20. real(kind=16) types? We currently rely on the following assumptions:
  21. -- if real(kind=10) exists, i.e. if HAVE_GFC_REAL_10 is defined,
  22. then it is necessarily the "long double" type
  23. -- if real(kind=16) exists, then:
  24. * if HAVE_GFC_REAL_10, real(kind=16) is "__float128"
  25. * otherwise, real(kind=16) is "long double"
  26. To allow to change this in the future, we create the
  27. GFC_REAL_16_IS_FLOAT128 macro that is used throughout libgfortran. */
  28. #if defined(HAVE_GFC_REAL_16)
  29. # if defined(HAVE_GFC_REAL_10)
  30. # define GFC_REAL_16_IS_FLOAT128
  31. # if !defined(HAVE_FLOAT128)
  32. # error "Where has __float128 gone?"
  33. # endif
  34. # else
  35. # define GFC_REAL_16_IS_LONG_DOUBLE
  36. # endif
  37. #endif