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]
Other format: [Raw text]

Re: ISO patch to delete HAVE_LONG_DOUBLE and HAVE_VOLATILE


 > From: Richard Henderson <rth@redhat.com>
 > 
 > On Mon, Jun 16, 2003 at 08:54:22PM -0400, Kaveh R. Ghazi wrote:
 > > +    long double ld;
 > >      double d;
 > 
 > Also, you're guaranteed that sizeof(long double) >= sizeof(double),
 > so we don't need both here, I don't think.
 > 
 > Otherwise ok.
 > r~

Ok... here's what I installed.

2003-06-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>

gcc:
	* alloc-pool.c: Don't check HAVE_LONG_DOUBLE.
	* fixinc/gnu-regex.c: Don't define `volatile'.
	* ggc-page.c: Don't check HAVE_LONG_DOUBLE.
	* ggc-simple.c: Likewise.
	* system.h: Don't define `volatile'.

	* aclocal.m4 (gcc_AC_C_VOLATILE, gcc_AC_C_LONG_DOUBLE): Delete.
	* configure.in (gcc_AC_C_VOLATILE, gcc_AC_C_LONG_DOUBLE): Don't
	call these macros.
	* config.in, configure: Regenerated.

include:
	* ansidecl.h: Delete HAVE_LONG_DOUBLE GCC bootstrap support.
	
diff -rup orig/egcc-CVS20030616/gcc/alloc-pool.c egcc-CVS20030616/gcc/alloc-pool.c
--- orig/egcc-CVS20030616/gcc/alloc-pool.c	2003-06-15 20:01:09.000000000 -0400
+++ egcc-CVS20030616/gcc/alloc-pool.c	2003-06-17 09:54:10.313511543 -0400
@@ -54,11 +54,8 @@ typedef struct allocation_object_def
 	 the following elements are here.  They are never accessed so
 	 the allocated object may be even smaller than this structure.  */
       char *align_p;
-      double align_d;
       HOST_WIDEST_INT align_i;
-#ifdef HAVE_LONG_DOUBLE
       long double align_ld;
-#endif
     } u;
 } allocation_object;
 
diff -rup orig/egcc-CVS20030616/gcc/fixinc/gnu-regex.c egcc-CVS20030616/gcc/fixinc/gnu-regex.c
--- orig/egcc-CVS20030616/gcc/fixinc/gnu-regex.c	2003-04-15 10:21:49.000000000 -0400
+++ egcc-CVS20030616/gcc/fixinc/gnu-regex.c	2003-06-17 09:53:51.294073011 -0400
@@ -78,10 +78,6 @@
 # define gettext_noop(String) String
 #endif
 
-# if !defined(volatile) && !defined(HAVE_VOLATILE)
-#  define volatile
-# endif
-
 /* If we are not linking with Emacs proper,
    we can't use the relocating allocator
    even if config.h says that we can.  */
diff -rup orig/egcc-CVS20030616/gcc/ggc-page.c egcc-CVS20030616/gcc/ggc-page.c
--- orig/egcc-CVS20030616/gcc/ggc-page.c	2003-06-07 20:01:31.000000000 -0400
+++ egcc-CVS20030616/gcc/ggc-page.c	2003-06-17 09:55:49.720433812 -0400
@@ -200,11 +200,7 @@ struct max_alignment {
   char c;
   union {
     HOST_WIDEST_INT i;
-#ifdef HAVE_LONG_DOUBLE
     long double d;
-#else
-    double d;
-#endif
   } u;
 };
 
diff -rup orig/egcc-CVS20030616/gcc/ggc-simple.c egcc-CVS20030616/gcc/ggc-simple.c
--- orig/egcc-CVS20030616/gcc/ggc-simple.c	2003-06-07 20:01:31.000000000 -0400
+++ egcc-CVS20030616/gcc/ggc-simple.c	2003-06-17 09:56:12.699500306 -0400
@@ -86,11 +86,7 @@ struct ggc_mem
   /* Make sure the data is reasonably aligned.  */
   union {
     HOST_WIDEST_INT i;
-#ifdef HAVE_LONG_DOUBLE
     long double d;
-#else
-    double d;
-#endif
   } u;
 };
 
diff -rup orig/egcc-CVS20030616/gcc/system.h egcc-CVS20030616/gcc/system.h
--- orig/egcc-CVS20030616/gcc/system.h	2003-06-16 17:28:16.000000000 -0400
+++ egcc-CVS20030616/gcc/system.h	2003-06-17 09:53:51.304072607 -0400
@@ -357,12 +357,6 @@ extern int setrlimit (int, const struct 
 # endif
 #endif
 
-/* HAVE_VOLATILE only refers to the stage1 compiler.  We also check
-   __STDC__ and assume gcc sets it and has volatile in stage >=2.  */
-#if !defined(HAVE_VOLATILE) && !defined(__STDC__) && !defined(volatile)
-#define volatile
-#endif
-
 #if defined (HAVE_DECL_ABORT) && !HAVE_DECL_ABORT
 extern void abort (void);
 #endif
diff -rup orig/egcc-CVS20030616/gcc/aclocal.m4 egcc-CVS20030616/gcc/aclocal.m4
--- orig/egcc-CVS20030616/gcc/aclocal.m4	2003-06-10 20:01:23.000000000 -0400
+++ egcc-CVS20030616/gcc/aclocal.m4	2003-06-17 09:53:51.314071543 -0400
@@ -163,36 +163,6 @@ fi
 AC_SUBST(LN)dnl
 ])
 
-dnl See whether the stage1 host compiler accepts the volatile keyword.
-AC_DEFUN(gcc_AC_C_VOLATILE,
-[AC_CACHE_CHECK([for volatile], gcc_cv_c_volatile,
-[AC_TRY_COMPILE(, [volatile int foo;],
-        gcc_cv_c_volatile=yes, gcc_cv_c_volatile=no)])
-if test $gcc_cv_c_volatile = yes ; then
-  AC_DEFINE(HAVE_VOLATILE, 1, [Define if your compiler understands volatile.])
-fi
-])
-
-dnl Check whether long double is supported.  This differs from the
-dnl built-in autoconf test in that it works for cross compiles.
-AC_DEFUN(gcc_AC_C_LONG_DOUBLE,
-[AC_CACHE_CHECK(for long double, gcc_cv_c_long_double,
-[if test "$GCC" = yes; then
-  gcc_cv_c_long_double=yes
-else
-AC_TRY_COMPILE(,
-[/* The Stardent Vistra knows sizeof(long double), but does not support it.  */
-long double foo = 0.0;
-/* On Ultrix 4.3 cc, long double is 4 and double is 8.  */
-switch (0) case 0: case (sizeof(long double) >= sizeof(double)):;],
-gcc_cv_c_long_double=yes, gcc_cv_c_long_double=no)
-fi])
-if test $gcc_cv_c_long_double = yes; then
-  AC_DEFINE(HAVE_LONG_DOUBLE, 1, 
-      [Define if your compiler supports the \`long double' type.])
-fi
-])
-
 dnl Check whether _Bool is built-in.
 AC_DEFUN(gcc_AC_C__BOOL,
 [AC_CACHE_CHECK(for built-in _Bool, gcc_cv_c__bool,
diff -rup orig/egcc-CVS20030616/gcc/configure.in egcc-CVS20030616/gcc/configure.in
--- orig/egcc-CVS20030616/gcc/configure.in	2003-06-16 15:11:00.000000000 -0400
+++ egcc-CVS20030616/gcc/configure.in	2003-06-17 09:53:51.324077931 -0400
@@ -244,9 +244,7 @@ CFLAGS="$save_CFLAGS"])
 
 AC_PROG_CPP
 AC_C_INLINE
-gcc_AC_C_VOLATILE
 
-gcc_AC_C_LONG_DOUBLE
 gcc_AC_C_LONG_LONG
 gcc_AC_C__BOOL
 
diff -rup orig/egcc-CVS20030616/include/ansidecl.h egcc-CVS20030616/include/ansidecl.h
--- orig/egcc-CVS20030616/include/ansidecl.h	2003-03-17 17:55:05.000000000 -0500
+++ egcc-CVS20030616/include/ansidecl.h	2003-06-17 09:53:51.324077931 -0400
@@ -312,15 +312,4 @@ So instead we use the macro below and te
 #define __extension__
 #endif
 
-/* Bootstrap support:  Adjust certain macros defined by Autoconf,
-   which are only valid for the stage1 compiler.  If we detect
-   a modern version of GCC, we are probably in stage2 or beyond,
-   so unconditionally reset the values.  Note that const, inline,
-   etc. have been dealt with above.  */
-#if (GCC_VERSION >= 2007)
-# ifndef HAVE_LONG_DOUBLE
-#  define HAVE_LONG_DOUBLE 1
-# endif
-#endif /* GCC >= 2.7 */
-
 #endif	/* ansidecl.h	*/


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