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]

patch for libf2c's use of gcc's internal headers. (part 1 of 3)


Recently, I noted on gcc-bugs that libf2c uses gcc's internal headers
to configure its types.  rth suggested that it would be more
appropriate for the C front-end to define appropriately-sized built-in
types which can be used in libf2c (as is done by C++ for the Java
runtime).

I hacked this together in compiler sources current as of this morning,
verified that the resulting compiler bootstrapped and ran on
sparc-sun-solaris2.7, and ran it through the testsuite just for
sanity's sake.  (it came out just about as well -- a bit better,
comparing the results by hand -- as Kaveh Ghzai's test results for
sparc-sun-solaris2.7 reported under the subject "Results for 2.96
20000430 (experimental) testsuite...")


Wasn't quite sure how to submit this, since it covers multiple
'ChangeLog' files, so i'm submitting it as one msg/patch per ChangeLog
file.  All three patches are needed for it to work properly,
obviously.


Comments appreciated, but please be gentle since this is my first
non-trivial change...  8-)



chris
===================================================================
(part 1 of 3, to be applied in egcs/gcc/f)

2000-05-01  Chris Demetriou  <cgd@sibyte.com>

	* com.h (FFECOM_f2cINTEGER, FFECOM_f2cLONGINT): Note that
	these types correspond to built-in types now defined in
	the C front end (for libf2c).


Index: gcc/f/com.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/f/com.h,v
retrieving revision 1.15
diff -u -r1.15 com.h
--- com.h	2000/04/12 22:08:32	1.15
+++ com.h	2000/05/01 21:25:47
@@ -127,6 +127,10 @@
 #define LONG_DOUBLE_TYPE_SIZE (BITS_PER_WORD * 2)
 #endif
 
+/* the C front-end provides __g77_integer and __g77_uinteger types so that
+   the appropriately-sized signed and unsigned integer types are available
+   for libf2c.  If you change this, also the definitions of those types
+   in ../c-decl.c. */
 #define FFECOM_f2cINTEGER			\
   (LONG_TYPE_SIZE == FLOAT_TYPE_SIZE		\
    ? FFECOM_f2ccodeLONG				\
@@ -136,6 +140,10 @@
 
 #define FFECOM_f2cLOGICAL FFECOM_f2cINTEGER
 
+/* the C front-end provides __g77_longint and __g77_ulongint types so that
+   the appropriately-sized signed and unsigned integer types are available
+   for libf2c.  If you change this, also the definitions of those types
+   in ../c-decl.c. */
 #define FFECOM_f2cLONGINT				\
  (LONG_TYPE_SIZE == (FLOAT_TYPE_SIZE * 2)		\
   ? FFECOM_f2ccodeLONG					\


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