From:	CSBVAX::CSBVAX::MRGATE::"SMTP::PREP.AI.MIT.EDU::INFO-GCC-REQUEST"  3-MAR-1989 22:13
To:	MRGATE::"ARISIA::EVERHART"
Subj:	Re: GCC.HLP for VMS


Received: from prep.ai.mit.edu by life.ai.mit.edu; Fri, 3 Mar 89 21:25:46 EST
Received: from TUT.CIS.OHIO-STATE.EDU by prep.ai.mit.edu; Fri, 3 Mar 89 21:02:52 EST
Received: by tut.cis.ohio-state.edu (5.59/3.890301)
	id AA15212; Fri, 3 Mar 89 21:12:15 EST
Received: from USENET by tut.cis.ohio-state.edu with netnews
	for info-gcc@prep.ai.mit.edu (info-gcc@prep.ai.mit.edu)
	(contact usenet@tut.cis.ohio-state.edu if you have questions)
Date: 3 Mar 89 21:08:59 GMT
From: iglesias@orion.cf.uci.edu  (Mike Iglesias)
Organization: University of California, Irvine
Subject: Re: GCC.HLP for VMS
Message-Id: <1540@orion.cf.uci.edu>
References: <8903031603.AA28490@prep.ai.mit.edu>
Sender: info-gcc-request@prep.ai.mit.edu
To: info-gcc@prep.ai.mit.edu

In article <8903031603.AA28490@prep.ai.mit.edu> SUE%GENESEO.BITNET@MITVMA.MIT.EDU (Sue Chichester) writes:
>Is there anyone who has GCC HELP set up for VMS?  I would appreciate it
>if someone could mail me there GCC.HLP file.

Here's one I wrote for v1.24 of VMS GCC.  It's not perfect, but it's
a start.  Just extract the archive below into a file and execute it
(i.e. @file) to make GCC.HLP.

A good part of this help file is taken from DEC's help file for VAXC,
especially the parts about /INCLUDE_DIRECTORY and /DEFINE.


Mike Iglesias
University of California, Irvine


$!...................... Cut on the dotted line and save ......................
$! VAX/VMS archive file created by VMS_SHAR V-5.04 04-Feb-1988
$! which was written by Michael Bednarek (U3369429@ucsvc.dn.mu.oz.au)
$! To unpack, simply save and execute (@) this file.
$!
$! This archive was created by MIGLESIAS
$! on Friday 3-MAR-1989 13:01:13.56
$!
$! It contains the following 1 file:
$! GCC.HLP
$!=============================================================================
$Set Symbol/Scope=(NoLocal,NoGlobal)
$Version=F$GetSYI("VERSION")
$If Version.ges."V4.4" then goto Version_OK
$Write SYS$Output "Sorry, you are running VMS ",Version, -
", but this procedure requires V4.4 or higher."
$Exit 44
$Version_OK:CR[0,8]=13
$Pass_or_Failed="failed!,passed."
$Goto Start
$Convert_File:
$Read/Time_Out=0/Error=No_Error1/Prompt="creating ''File_is'" SYS$Command ddd
$No_Error1:Define/User_Mode SYS$Output NL:
$Edit/TPU/NoSection/NoDisplay/Command=SYS$Input/Output='File_is' -
VMS_SHAR_DUMMY.DUMMY
f:=Get_Info(Command_Line,"File_Name");b:=Create_Buffer("",f);
o:=Get_Info(Command_Line,"Output_File");Set(Output_File,b,o);
Position(Beginning_of(b));Loop x:=Erase_Character(1);Loop ExitIf x<>"V";
Move_Vertical(1);x:=Erase_Character(1);Append_Line;
Move_Horizontal(-Current_Offset);EndLoop;Move_Vertical(1);
ExitIf Mark(None)=End_of(b) EndLoop;Position(Beginning_of(b));Loop
x:=Search("`",Forward,Exact);ExitIf x=0;Position(x);Erase_Character(1);
If Current_Character='`' then Move_Horizontal(1);else
Copy_Text(ASCII(INT(Erase_Character(3))));EndIf;EndLoop;Exit;
$Delete VMS_SHAR_DUMMY.DUMMY;*
$Checksum 'File_is
$Success=F$Element(Check_Sum_is.eq.CHECKSUM$CHECKSUM,",",Pass_or_Failed)+CR
$Read/Time_Out=0/Error=No_Error2/Prompt=" CHECKSUM ''Success'" SYS$Command ddd
$No_Error2:Return
$Start:
$File_is="GCC.HLP"
$Check_Sum_is=846352317
$Copy SYS$Input VMS_SHAR_DUMMY.DUMMY
X1 GCC
X The GCC command invokes the GNU C compiler.
X
X      GCC file-spec
X
X2 Parameters
X
X file-spec
X
X     A C source file.  If no input file extension is specified, GNU C 
X     assumes .C as the default extension.
X
X2 Qualifiers
X
X GNU C command qualifiers modify the way the compiler handles the
X compiliation.
X
X The following is the list of available qualifiers for GNU C:
X
X
X   o  /CC1_OPTIONS=(option [,option...]])
X
X   o  /DEBUG
X
X   o  /DEFINE=(identifier[=definition][,...])
X
X   o  /INCLUDE_DIRECTORY=(pathname [,pathname...]])
X
X   o  /MACHINE_CODE
X
X   o  /OPTIMIZE
X
X   o  /VERBOSE
X
X
X2 Linking
X
X When linking programs compiled with GNU C, you should include the GNU
X C library before the VAX C library.  For example,
X
X  LINK object-file,GNU_CC:[000000]GCCLIB/LIB,SYS$LIBRARY:VAXCRTL/LIB
X
X You can also link your program with the shared VAX C library.  This
X can reduce the size of the .EXE file, as well as make it smaller
X when it's running.  For example,
X
X  $ LINK object-file, GNU_CC:[000000]GCCLIB/LIB,SYS$INPUT:/OPTIONS
X  SYS$SHARE:VAXCRTL/SHARE
X
X (If you use the second example and type it in by hand, be sure to type
X  ^Z after the last carriage return)
X
X2 /DEBUG
X
X Includes additional information in the object file for use with the
X VAX Symbolic Debugger.
X
X2 /DEFINE=(identifier[=definition][,...])
X
X /DEFINE performs the same  function  as  the  #define  preprocessor
X directive.   That is, /DEFINE defines a token string or macro to be
X substituted for every occurrence  of  a  given  identifier  in  the
X program.
X
X DCL converts all input  to  uppercase  unless  it  is  enclosed  in
X quotation marks.
X
X The simplest form of a /DEFINE definition is
X
X /DEFINE=true
X
X This results in a definition like the one that would result from
X
X #define TRUE 1
X
X Macro definitions must be enclosed in quotation marks  as  seen  in
X the definition
X
X /DEFINE="funct(a)=a+sin(a)"
X
X This definition produces the same results as
X
X #define funct(a) a+sin(a)
X
X When more than one /DEFINE is present on the GCC  command  or  in  a
X single compilation unit, only the last /DEFINE is used.
X
X When both /DEFINE and /UNDEFINE are  present  in  a  command  line,
X /DEFINE is always evaluated before /UNDEFINE.
X
X2 /INCLUDE_DIRECTORY=(pathname [,pathname...])
X
X Provides an additional level of  search  for  user-defined  include
X files.   Each  pathname  argument can be either a logical name or a
X legal directory specification, in quoted form.
X
X This  qualifier allows you to  specify additional directories to 
X search for  include  files.   The  forms  of  inclusion  are  the  
X #include  "file-spec"  and #include  <file-spec> forms.  For the 
X quoted form, the order of search is  as  follows:
X
X 1.  The directory containing the source file.
X
X 2.  The directories specified in the /INCLUDE qualifier (if any).
X
X 3.  The directory or search list of directories  specified  in  the
X     logical name GNU_CC_INCLUDE.
X
X 4.  The directory or search list of directories  specified  in  the
X     logical name SYS$LIBRARY.
X
X For the bracketed form, the order of search is as follows:
X
X 1.  The directories specified in the /INCLUDE qualifier (if any).
X
X 2.  The directory or search list of directories  specified  in  the
X     logical name GNU_CC_INCLUDE.
X
X 3.  The directory or search list of directories  specified  in  the
X     logical name SYS$LIBRARY.
X
X2 /MACHINE_CODE
X
X Tells GNU C to output the machine code generated by the compiler.  Note
X that no object file is produced when /MACHINE_CODE is specified.  The
X machine code is output to a file with the same name as the input file,
X with the extension .S.
X
X2 /OPTIMIZE
X    /NOOPTIMIZE
X
X Controls whether optimization is performed by the compiler.  By default,
X optimization is on.  /NOOPTIMIZE turns optimization off.
X
X2 /UNDEFINE
X
X /UNDEFINE performs the same function  as  the  #undef  preprocessor
X directive.  That is, it cancels a macro definition.
X
X When both /DEFINE and /UNDEFINE are present on  the  command  line,
X /DEFINE is always evaluated before /UNDEFINE.
X
X2 /VERBOSE
X
X Controls whether the user sees the invocation command strings for the
X preprocessor, compiler, and assembler.  The compiler also outputs
X some statistics on time spent in its various phases.
$GoSub Convert_File
$Exit
