Patch for gengtype: support GNU Fortran 95

Steven Bosscher s.bosscher@student.tudelft.nl
Sun Jun 23 15:47:00 GMT 2002


Op zo 23-06-2002, om 23:52 schreef Geoff Keating:
> > Op zo 23-06-2002, om 13:20 schreef Geoff Keating:
> > > If you link to any file starting with "c-", then this patch is
> > > incomplete; you'll also need to modify get_base_file_bitmap too.
> > 
> > I don't understand this, but I guess that's because you've missed
> > something: We use the C RTL expander... 
> 
> gengtype needs to know what source files end up in which compilers.
> By default, it assumes that c-* files in the toplevel directory are
> used only by the C compiler.  If other compilers use them, it has to
> be told.  It doesn't matter what you do with them, only whether
> they're linked in.

Ah!. So would this be a more appropriate patch, then?

Greetz
Steven


> > > A Changelog entry would also be good.

2002-06-24  Paul Brook  <paul@nowt.org>
        * gengtype.c Add f95 to lang_names.


Index: gengtype.c
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/gengtype.c,v
retrieving revision 1.6.2.2
diff -c -r1.6.2.2 gengtype.c
*** gengtype.c	17 Jun 2002 03:37:29 -0000	1.6.2.2
--- gengtype.c	23 Jun 2002 22:18:26 -0000
***************
*** 519,529 ****
    BASE_FILE_OBJC,
    BASE_FILE_CPLUSPLUS,
    BASE_FILE_TREELANG,
!   BASE_FILE_COBOL
  };
  
  static const char *lang_names[] = {
!   "c", "objc", "cp", "treelang", "cobol", "f", "ada", "java"
  };
  #define NUM_BASE_FILES (sizeof (lang_names) / sizeof (lang_names[0]))
  outf_p base_files[NUM_BASE_FILES];
--- 519,533 ----
    BASE_FILE_OBJC,
    BASE_FILE_CPLUSPLUS,
    BASE_FILE_TREELANG,
!   BASE_FILE_COBOL,
!   BASE_FILE_F77,
!   BASE_FILE_F95,
!   BASE_FILE_ADA,
!   BASE_FILE_JAVA
  };
  
  static const char *lang_names[] = {
!   "c", "objc", "cp", "treelang", "cobol", "f", "f95", "ada", "java"
  };
  #define NUM_BASE_FILES (sizeof (lang_names) / sizeof (lang_names[0]))
  outf_p base_files[NUM_BASE_FILES];
***************
*** 658,663 ****
--- 662,669 ----
      basename++;
    if (startswith (basename - f, basename-2, "f/"))
      basename -= 2;
+   else if (startswith (basename - f, basename-4, "f95/"))
+     basename -= 4;
    else if (startswith (basename - f, basename-3, "cp/"))
      basename -= 3;
    else if (startswith (basename - f, basename-4, "ada/"))
***************
*** 705,710 ****
--- 711,722 ----
  	   || strcmp (basename, "c-decl.c") == 0
  	   || strcmp (basename, "c-objc-common.c") == 0)
      return 1 << BASE_FILE_C | 1 << BASE_FILE_OBJC;
+   else if (startswith (len, basename, "c-semantics.c"))
+     return 1 << BASE_FILE_C | 1 << BASE_FILE_OBJC | 1 << BASE_FILE_CPLUSPLUS
+       | 1 << BASE_FILE_F95;
+   else if (startswith (len, basename, "c-pretty-print.c"))
+     return 1 << BASE_FILE_C | 1 << BASE_FILE_OBJC | 1 << BASE_FILE_CPLUSPLUS
+       | 1 << BASE_FILE_F95;
    else if (startswith (len, basename, "c-common.c"))
      return 1 << BASE_FILE_C | 1 << BASE_FILE_OBJC| 1 << BASE_FILE_CPLUSPLUS
        |  1 << BASE_FILE_TREELANG | 1 << BASE_FILE_COBOL;




More information about the Gcc-patches mailing list