This is the mail archive of the gcc-patches@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]

SH: warnings on float.h


Hi,

gcc warns about its own float.h:

>sh-hitachi-coff-gcc -v
Using builtin specs.
Configured with: ../gcc-20010528/configure --verbose
--target=sh-hitachi-coff --prefix=/gcc-3.0-sh --host=i586-pc-cygwin32
--enable-haifa
Thread model: single
gcc version 3.0 20010528 (prerelease)

>sh-hitachi-coff-gcc  -ansi -Wall -Wwrite-strings -Wno-trigraphs -Wunused
-Wno-main -Wundef -Wmissing-declarations -Wpointer-arith [...]  -Wp,-lang-c
-E -o frmrd.i frmrd.c 
[...]
In file included from frmrd.c:40:
../gcc-sh-3.0/lib/gcc-lib/sh-hitachi-coff/3.0/include/float.h:133:5:
warning: "__STDC_VERSION__" is not defined

This should be guarded by an #ifdef
Looks like other float-*.h header should be changed too

Hartmut

*** float-sh.h.orig	Fri Feb  2 17:57:57 2001
--- float-sh.h	Thu May 31 12:44:09 2001
***************
*** 130,135 ****
--- 130,136 ----
  #undef LDBL_MAX_10_EXP
  #define LDBL_MAX_10_EXP 308
  
+ #ifdef __STDC_VERSION__
  #if __STDC_VERSION__ >= 199901L
     /* The floating-point expression evaluation method.
          -1  indeterminate
***************
*** 156,160 ****
--- 157,162 ----
  # define DECIMAL_DIG	17
  
  #endif	/* C99 */
+ #endif	/* def __STDC_VERSION__ */
  
  #endif /*  _FLOAT_H_ */


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