document Mercury front-end

Fergus Henderson fjh@cs.mu.oz.au
Wed Jan 31 07:03:00 GMT 2001


This addresses most of Joseph S. Myers <jsm28@cam.ac.uk>'s review
comments about missing documentation for the Mercury front-end.
I haven't got a patch for the web pages yet.

Obviously it won't make any sense to commit this until the other
changes to add the Mercury front-end have been committed.

----------

2001-02-01  Fergus Henderson  <fjh@cs.mu.oz.au>

	Document the Mercury front-end.

	* invoke.texi: Document .mer suffix -- but commented out,
	  since it doesn't work yet.
	  Document Objective-C/Mercury conflict over .m suffix.
	  Move Objective-C documentation towards the end so that this point
	  doesn't obscure the documentation of C, C++, and Fortran.
	* gcc.c (default_compilers): add .mer suffix.
	* contrib.texi: mention self and the Mercury group.
	* gcc.texi (G++ and GCC): Mention Mercury.
	  (Standards): Add pointers to Mercury documentation.
	  (gccbug): Add mercury bug category, commented out for now.

Index: gcc.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/gcc.c,v
retrieving revision 1.202
diff -u -d -c -3 -p -r1.202 gcc.c
*** gcc.c	2001/01/16 18:02:01	1.202
--- gcc.c	2001/01/31 14:33:40
*************** static struct compiler default_compilers
*** 720,725 ****
--- 720,726 ----
       were not present when we built the driver, we will hit these copies
       and be given a more meaningful error than "file not used since
       linking is not done".  */
+   {".mer",  "#Mercury"},
    {".m",  "#Objective-C"}, {".mi",  "#Objective-C"},
    {".cc", "#C++"}, {".cxx", "#C++"}, {".cpp", "#C++"}, {".cp", "#C++"},
    {".c++", "#C++"}, {".C", "#C++"}, {".ii", "#C++"},
Index: invoke.texi
===================================================================
RCS file: /cvs/gcc/gcc/gcc/invoke.texi,v
retrieving revision 1.270
diff -u -d -c -3 -p -r1.270 invoke.texi
*** invoke.texi	2001/01/23 21:35:15	1.270
--- invoke.texi	2001/01/31 14:33:42
*************** C source code which should not be prepro
*** 630,642 ****
  @item @var{file}.ii
  C++ source code which should not be preprocessed.
  
- @item @var{file}.m
- Objective-C source code.  Note that you must link with the library
- @file{libobjc.a} to make an Objective-C program work.
- 
- @item @var{file}.mi
- Objective-C source code which should not be preprocessed.
- 
  @item @var{file}.h
  C header file (not to be compiled or linked).
  
--- 630,635 ----
*************** preprocessor (not included with GCC).
*** 669,674 ****
--- 662,689 ----
  Using and Porting GNU Fortran}, for more details of the handling of
  Fortran input files.
  
+ @c ??? The .mer extension doesn't work yet.
+ @c     Neither the Mercury compiler nor Mmake support it.
+ @c @item @var{file}.mer
+ @c Mercury source code.
+ 
+ @item @var{file}.m
+ Either Objective-C source code, or Mercury source code.
+ For historical reasons, both Objective-C and Mercury use the @samp{.m}
+ extension.  If GCC was built with only one of these two language
+ front-ends enabled, then @var{file}.m will be treated as the language
+ that is enabled.  If GCC was built with @emph{both} of these languages
+ enabled, e.g. using the @samp{--enable-languages=} option to configure,
+ then whichever one was named last when GCC was configured will take
+ precedence.  You can use the @samp{-x} option described below to
+ override this.
+ 
+ Note that you must link with the library
+ @file{libobjc.a} to make an Objective-C program work.
+ 
+ @item @var{file}.mi
+ Objective-C source code which should not be preprocessed.
+ 
  @c FIXME: Descriptions of Java file types.
  @c @var{file}.java
  @c @var{file}.class
*************** the next @samp{-x} option.  Possible val
*** 710,719 ****
  @example
  c  c-header  cpp-output
  c++  c++-cpp-output
- objective-c  objc-cpp-output
  assembler  assembler-with-cpp
  f77  f77-cpp-input  ratfor
! java  chill
  @end example
  @c Also f77-version, for internal use only.
  
--- 725,736 ----
  @example
  c  c-header  cpp-output
  c++  c++-cpp-output
  assembler  assembler-with-cpp
  f77  f77-cpp-input  ratfor
! java  
! mercury
! objective-c  objc-cpp-output
! chill
  @end example
  @c Also f77-version, for internal use only.
  
Index: contrib.texi
===================================================================
RCS file: /cvs/gcc/gcc/gcc/contrib.texi,v
retrieving revision 1.8
diff -u -d -c -3 -p -r1.8 contrib.texi
*** contrib.texi	2000/12/07 02:26:59	1.8
--- contrib.texi	2001/01/31 14:33:42
*************** fixes.
*** 169,174 ****
--- 169,178 ----
  Kate Hedstrom for staking the g77 folks with an initial testsuite.
  
  @item
+ Fergus Henderson and the Mercury group at the University of Melbourne,
+ Australia, for the Mercury front-end.
+ 
+ @item
  Richard Henderson for his ongoing SPARC and alpha work, loop opts, and
  generally fixing lots of old problems we've ignored for years, flow
  rewrite and lots of stuff I've forgotten.
Index: gcc.texi
===================================================================
RCS file: /cvs/gcc/gcc/gcc/gcc.texi,v
retrieving revision 1.73
diff -u -d -c -3 -p -r1.73 gcc.texi
*** gcc.texi	2001/01/24 18:47:35	1.73
--- gcc.texi	2001/01/31 14:33:43
*************** bugs.  It corresponds to GCC version 2.9
*** 267,279 ****
  
  @ifset USING
  @node G++ and GCC
! @chapter Compile C, C++, Objective C, Fortran, Java or CHILL
  
  @cindex Objective C
! Several versions of the compiler (C, C++, Objective C, Fortran, Java
! and CHILL) are integrated; this is why we use the name 
  ``GNU Compiler Collection''. GCC can compile programs written in any of these
! languages. The Fortran, CHILL, and Java compilers are described in 
  separate manuals.
  
  @cindex GCC
--- 267,280 ----
  
  @ifset USING
  @node G++ and GCC
! @chapter Compile C, C++, Objective C, Fortran, Java, Mercury or CHILL
  
  @cindex Objective C
! @cindex Mercury
! Several versions of the compiler (C, C++, Objective C, Fortran, Java,
! Mercury and CHILL) are integrated; this is why we use the name 
  ``GNU Compiler Collection''. GCC can compile programs written in any of these
! languages. The Fortran, Java, Mercury and CHILL compilers are described in 
  separate manuals.
  
  @cindex GCC
*************** Fortran}, for details of the Fortran lan
*** 474,479 ****
--- 475,486 ----
  @xref{Compatibility,,Compatibility with the Java Platform, gcj, GNU gcj},
  for details of compatibility between @code{gcj} and the Java Platform.
  
+ @xref{Top,,Language Reference Manual, mercury_ref, The Mercury Language Reference Manual}, and
+ @xref{Top,,Library Reference Manual, mercury_library, The Mercury Library Reference Manual},
+ for documentation on the Mercury language and standard library respectively.
+ These and other documentation on Mercury are also available from
+ @uref{ http://www.cs.mu.oz.au/mercury/information/documentation.html} .
+ 
  @xref{References,,Language Definition References, chill, GNU Chill},
  for details of the CHILL standard.
  
*************** driver.
*** 2749,2754 ****
--- 2756,2767 ----
  
  @item fortran
  A problem with the Fortran 77.
+ 
+ @c ??? There's no `mercury' category.
+ @c     Currently Mercury bug reports should go to mercury-bugs@cs.mu.oz.au
+ @c     rather than via the gcc bug reporting mechanism.
+ @c @item mercury
+ @c A problem with the Mercury compiler.
  
  @item java
  A problem with the Java compiler.
-- 
Fergus Henderson <fjh@cs.mu.oz.au>  |  "I have always known that the pursuit
                                    |  of excellence is a lethal habit"
WWW: < http://www.cs.mu.oz.au/~fjh >  |     -- the last words of T. S. Garp.


More information about the Gcc-patches mailing list