Adjust the C++ preprocessor to include /usr/include/c++ by default for
[dragonfly.git] / contrib / gcc / f / g77.1
1 .\" Copyright (c) 1995-1997 Free Software Foundation              -*-Text-*-
2 .\" See section COPYING for conditions for redistribution
3 .\" FIXME: no info here on predefines.  Should there be?  extra for F77...
4 .TH G77 1 "1999-02-14" "GNU Tools" "GNU Tools"
5 .de BP
6 .sp
7 .ti \-.2i
8 \(**
9 ..
10 .SH NAME
11 g77 \- GNU project Fortran Compiler (v0.5.24)
12 .SH SYNOPSIS
13 .RB g77 " [" \c
14 .IR option " | " "filename " ].\|.\|.
15 .SH WARNING
16 The information in this man page is an extract from the full
17 documentation of the GNU Fortran compiler (version 0.5.24),
18 and is limited to the meaning of some of the options.
19 .PP
20 This man page is not up to date, since no volunteers want to
21 maintain it.  If you find a discrepancy between the man page and the
22 software, please check the Info file, which is the authoritative
23 documentation.
24 .\" .PP
25 .\" The version of GNU Fortran documented by the Info file is 0.5.24,
26 .\" which includes substantial improvements and changes since 0.5.24,
27 .\" the version documented in this man page.
28 .PP
29 If we find that the things in this man page that are out of date cause
30 significant confusion or complaints, we will stop distributing the man
31 page.  The alternative, updating the man page when we update the Info
32 file, is impractical because the rest of the work of maintaining GNU Fortran
33 leaves us no time for that.  The GNU project regards man pages as
34 obsolete and should not let them take time away from other things.
35 .PP
36 For complete and current documentation, refer to the Info file `\|\c
37 .B g77\c
38 \&\|' or the manual
39 .I
40 Using and Porting GNU Fortran (for version 0.5.24)\c
41 \&.  Both are made from the Texinfo source file
42 .BR g77.texi .
43 .PP
44 If your system has the `\|\c
45 .B info\c
46 \&\|' command installed, the command `\|\c
47 .B info g77\c
48 \&\|' should work, unless
49 .B g77
50 has not been properly installed.
51 If your system lacks `\|\c
52 .B info\c
53 \&\|', or you wish to avoid using it for now,
54 the command `\|\c
55 .B more /usr/info/g77.info*\c
56 \&\|' should work, unless
57 .B g77
58 has not been properly installed.
59 .PP
60 If
61 .B g77
62 has not been properly installed, so that you
63 cannot easily access the Info file for it,
64 ask your system administrator, or the installer
65 of
66 .B g77
67 (if you know who that is) to fix the problem.
68 .SH DESCRIPTION
69 The C and F77 compilers are integrated;
70 .B g77
71 is a program to call
72 .B gcc
73 with options to recognize programs written in Fortran (ANSI FORTRAN 77,
74 also called F77).
75 .B gcc
76 processes input files
77 through one or more of four stages: preprocessing, compilation,
78 assembly, and linking.  This man page contains full descriptions for
79 .I only
80 F77-specific aspects of the compiler, though it also contains
81 summaries of some general-purpose options.  For a fuller explanation
82 of the compiler, see
83 .BR gcc ( 1 ).
84
85 For complete documentation on GNU Fortran, type `\|\c
86 .B info g77\c
87 \&\|'.
88
89 F77 source files use the suffix `\|\c
90 .B .f\c
91 \&\|', `\|\c
92 .B .for\c
93 \&\|', or `\|\c
94 .B .FOR\c
95 \&\|'; F77 files to be preprocessed by
96 .BR cpp ( 1 )
97 use the suffix `\|\c
98 .B .F\c
99 \&\|', `\|\c
100 .B .fpp\c
101 \&\|', or `\|\c
102 .B .FPP\c
103 \&\|'; Ratfor source files use the suffix `\|\c
104 .B .r\c
105 \&\|' (though
106 .B ratfor
107 itself is not supplied as part of
108 .B g77\c
109 \&).
110 .SH OPTIONS
111 There are many command-line options, including options to control
112 details of optimization, warnings, and code generation, which are
113 common to both
114 .B gcc
115 and
116 .B g77\c
117 \&.  For full information on all options, see
118 .BR gcc ( 1 ).
119
120 Options must be separate: `\|\c
121 .B \-dr\c
122 \&\|' is quite different from `\|\c
123 .B \-d \-r
124 \&\|'.
125
126 Most `\|\c
127 .B \-f\c
128 \&\|' and `\|\c
129 .B \-W\c
130 \&\|' options have two contrary forms:
131 .BI \-f name
132 and
133 .BI \-fno\- name\c
134 \& (or
135 .BI \-W name
136 and
137 .BI \-Wno\- name\c
138 \&). Only the non-default forms are shown here.
139
140 .TP
141 .B \-c
142 Compile or assemble the source files, but do not link.  The compiler
143 output is an object file corresponding to each source file.
144 .TP
145 .BI \-D macro
146 Define macro \c
147 .I macro\c
148 \& with the string `\|\c
149 .B 1\c
150 \&\|' as its definition.
151 .TP
152 .BI \-D macro = defn
153 Define macro \c
154 .I macro\c
155 \& as \c
156 .I defn\c
157 \&.
158 .TP
159 .B \-E
160 Stop after the preprocessing stage; do not run the compiler proper.  The
161 output is preprocessed source code, which is sent to the
162 standard output.
163 .TP
164 .B \-g
165 Produce debugging information in the operating system's native format
166 (for DBX or SDB or DWARF).  GDB also can work with this debugging
167 information.  On most systems that use DBX format, `\|\c
168 .B \-g\c
169 \&\|' enables use
170 of extra debugging information that only GDB can use.
171
172 Unlike most other Fortran compilers, GNU Fortran allows you to use `\|\c
173 .B \-g\c
174 \&\|' with
175 `\|\c
176 .B \-O\c
177 \&\|'.  The shortcuts taken by optimized code may occasionally
178 produce surprising results: some variables you declared may not exist
179 at all; flow of control may briefly move where you did not expect it;
180 some statements may not be executed because they compute constant
181 results or their values were already at hand; some statements may
182 execute in different places because they were moved out of loops.
183
184 Nevertheless it proves possible to debug optimized output.  This makes
185 it reasonable to use the optimizer for programs that might have bugs.
186 .TP
187 .BI "\-I" "dir"\c
188 \&
189 Append directory \c
190 .I dir\c
191 \& to the list of directories searched for include files.
192 .TP
193 .BI "\-L" "dir"\c
194 \&
195 Add directory \c
196 .I dir\c
197 \& to the list of directories to be searched
198 for `\|\c
199 .B \-l\c
200 \&\|'.
201 .TP
202 .BI \-l library\c
203 \&
204 Use the library named \c
205 .I library\c
206 \& when linking.
207 .TP
208 .B \-nostdinc
209 Do not search the standard system directories for header files.  Only
210 the directories you have specified with
211 .B \-I
212 options (and the current directory, if appropriate) are searched.
213 .TP
214 .B \-O
215 Optimize.  Optimizing compilation takes somewhat more time, and a lot
216 more memory for a large function.  See the GCC documentation for
217 further optimisation options.  Loop unrolling, in particular, may be
218 worth investigating for typical numerical Fortran programs.
219 .TP
220 .BI "\-o " file\c
221 \&
222 Place output in file \c
223 .I file\c
224 \&.
225 .TP
226 .B \-S
227 Stop after the stage of compilation proper; do not assemble.  The output
228 is an assembler code file for each non-assembler input
229 file specified.
230 .TP
231 .BI \-U macro
232 Undefine macro \c
233 .I macro\c
234 \&.
235 .TP
236 .B \-v
237 Print (on standard error output) the commands executed to run the
238 stages of compilation.  Also print the version number of the compiler
239 driver program and of the preprocessor and the compiler proper.  The
240 version numbers of g77 itself and the GCC distribution on which it is
241 based are distinct.
242 .TP
243 .B \-Wall
244 Issue warnings for conditions which pertain to usage that we recommend
245 avoiding and that we believe is easy to avoid, even in conjunction
246 with macros.
247 .PP
248
249 .SH FILES
250 .ta \w'LIBDIR/g77\-include 'u
251 file.h    C header (preprocessor) file
252 .br
253 file.f    Fortran source file
254 .br
255 file.for  Fortran source file
256 .br
257 file.FOR  Fortran source file
258 .br
259 file.F    preprocessed Fortran source file
260 .br
261 file.fpp  preprocessed Fortran source file
262 .br
263 file.FPP  preprocessed Fortran source file
264 .br
265 file.r    Ratfor source file (ratfor not included)
266 .br
267 file.s    assembly language file
268 .br
269 file.o    object file
270 .br
271 a.out     link edited output
272 .br
273 \fITMPDIR\fR/cc\(**     temporary files
274 .br
275 \fILIBDIR\fR/cpp        preprocessor
276 .br
277 \fILIBDIR\fR/f771       compiler
278 .br
279 \fILIBDIR\fR/libg2c.a   Fortran run-time library
280 .br
281 \fILIBDIR\fR/libgcc.a   GCC subroutine library
282 .br
283 /lib/crt[01n].o start-up routine
284 .br
285 /lib/libc.a     standard C library, see
286 .IR intro (3)
287 .br
288 /usr/include    standard directory for
289 .B #include
290 files
291 .br
292 \fILIBDIR\fR/include    standard gcc directory for
293 .B #include
294 .br
295                         files.
296 .sp
297 .I LIBDIR
298 is usually
299 .B /usr/local/lib/\c
300 .IR machine / version .
301 .sp
302 .I TMPDIR
303 comes from the environment variable
304 .B TMPDIR
305 (default
306 .B /usr/tmp
307 if available, else
308 .B /tmp\c
309 \&).
310 .SH "SEE ALSO"
311 gcc(1), cpp(1), as(1), ld(1), gdb(1), adb(1), dbx(1), sdb(1).
312 .br
313 .RB "`\|" g77 "\|', `\|" gcc "\|', `\|" cpp "\|',"
314 .RB "`\|" as "\|', `\|" ld "\|',"
315 and
316 .RB "`\|" gdb "\|'"
317 entries in
318 .B info\c
319 \&.
320 .br
321 .I
322 Using and Porting GNU Fortran (for version 0.5.24)\c
323 , James Craig Burley;
324 .I
325 Using and Porting GNU CC (for version 2.0)\c
326 , Richard M. Stallman;
327 .I
328 The C Preprocessor\c
329 , Richard M. Stallman;
330 .I
331 Debugging with GDB: the GNU Source-Level Debugger\c
332 , Richard M. Stallman and Roland H. Pesch;
333 .I
334 Using as: the GNU Assembler\c
335 , Dean Elsner, Jay Fenlason & friends;
336 .I
337 gld: the GNU linker\c
338 , Steve Chamberlain and Roland Pesch.
339
340 .SH BUGS
341 For instructions on how to report bugs, type `\|\c
342 .B info g77 -n Bugs\c
343 \&\|'.
344
345 .SH COPYING
346 Copyright (c) 1991-1998 Free Software Foundation, Inc.
347 .PP
348 Permission is granted to make and distribute verbatim copies of
349 this manual provided the copyright notice and this permission notice
350 are preserved on all copies.
351 .PP
352 Permission is granted to copy and distribute modified versions of this
353 manual under the conditions for verbatim copying, provided that the
354 entire resulting derived work is distributed under the terms of a
355 permission notice identical to this one.
356 .PP
357 Permission is granted to copy and distribute translations of this
358 manual into another language, under the above conditions for modified
359 versions, except that this permission notice may be included in
360 translations approved by the Free Software Foundation instead of in
361 the original English.
362 .SH AUTHORS
363 See the GNU CC Manual for the contributors to GNU CC.
364 See the GNU Fortran Manual for the contributors to
365 GNU Fortran.