Commit 91ea548a by Joseph Myers Committed by Joseph Myers

re PR c/2291 (Pedantic may be too pedantic)

	* invoke.texi: Document meaning of -pedantic when -std=gnu* is
	used.  Fixes PR c/2291.
	* gcc.1: Regenerate.

From-SVN: r42340
parent dbf03ee3
2001-05-20 Joseph S. Myers <jsm28@cam.ac.uk>
* invoke.texi: Document meaning of -pedantic when -std=gnu* is
used. Fixes PR c/2291.
* gcc.1: Regenerate.
2001-05-20 Stephane Carrez <Stephane.Carrez@worldnet.fr>
* config/m68hc11/m68hc11.c (m68hc11_override_options): Ignore
......
.\" Automatically generated by Pod::Man version 1.15
.\" Wed Apr 25 21:39:15 2001
.\" Sun May 20 12:45:49 2001
.\"
.\" Standard preamble:
.\" ======================================================================
......@@ -138,7 +138,7 @@
.\" ======================================================================
.\"
.IX Title "GCC 1"
.TH GCC 1 "gcc-3.1" "2001-04-25" "GNU"
.TH GCC 1 "gcc-3.1" "2001-05-20" "GNU"
.UC
.SH "NAME"
gcc \- \s-1GNU\s0 project C and \*(C+ compiler
......@@ -227,6 +227,11 @@ in the following sections.
\&\-Wno-non-template-friend \-Wold-style-cast
\&\-Woverloaded-virtual \-Wno-pmf-conversions
\&\-Wsign-promo \-Wsynth\fR
.Ip "\fIObjective-C Language Options\fR" 4
.IX Item "Objective-C Language Options"
\&\fB\-fconstant-string-class=\fR\fIclass name\fR
\&\fB\-fgnu-runtime \-fnext-runtime \-gen-decls
\&\-Wno-protocol \-Wselector\fR
.Ip "\fILanguage Independent Options\fR" 4
.IX Item "Language Independent Options"
\&\fB\-fmessage-length=\fR\fIn\fR
......@@ -486,11 +491,10 @@ in the following sections.
\&\fB\-mintel-syntax \-mieee-fp \-mno-fancy-math-387
\&\-mno-fp-ret-in-387 \-msoft-float \-msvr3\-shlib
\&\-mno-wide-multiply \-mrtd \-malign-double
\&\-malign-jumps=\fR\fInum\fR \fB\-malign-loops=\fR\fInum\fR
\&\fB\-malign-functions=\fR\fInum\fR \fB\-mpreferred-stack-boundary=\fR\fInum\fR
\&\-mpreferred-stack-boundary=\fR\fInum\fR
\&\fB\-mthreads \-mno-align-stringops \-minline-all-stringops
\&\-mpush-args \-maccumulate-outgoing-args \-m128bit-long-double
\&\-m96bit-long-double \-mregparm=\fR\fInum\fR
\&\-m96bit-long-double \-mregparm=\fR\fInum\fR \fB\-momit-leaf-frame-pointer\fR
.Sp
\&\fI\s-1HPPA\s0 Options\fR
.Sp
......@@ -1160,6 +1164,17 @@ two definitions were merged.
.Sp
This option is no longer useful on most targets, now that support has
been added for putting variables into \s-1BSS\s0 without making them common.
.Ip "\fB\-fno-const-strings\fR" 4
.IX Item "-fno-const-strings"
Give string constants type \f(CW\*(C`char *\*(C'\fR instead of type \f(CW\*(C`const
char *\*(C'\fR. By default, G++ uses type \f(CW\*(C`const char *\*(C'\fR as required by
the standard. Even if you use \fB\-fno-const-strings\fR, you cannot
actually modify the value of a string constant, unless you also use
\&\fB\-fwritable-strings\fR.
.Sp
This option might be removed in a future release of G++. For maximum
portability, you should structure your code so that it works with
string constants that have type \f(CW\*(C`const char *\*(C'\fR.
.Ip "\fB\-fdollars-in-identifiers\fR" 4
.IX Item "-fdollars-in-identifiers"
Accept \fB$\fR in identifiers. You can also explicitly prohibit use of
......@@ -1249,6 +1264,11 @@ errors if these functions are not inlined everywhere they are called.
.IX Item "-fms-extensions"
Disable pedantic warnings about constructs used in \s-1MFC\s0, such as implicit
int and getting a pointer to member function via non-standard syntax.
.Ip "\fB\-fno-nonansi-builtins\fR" 4
.IX Item "-fno-nonansi-builtins"
Disable builtin declarations of functions that are not mandated by
\&\s-1ANSI/ISO\s0 C. These include \f(CW\*(C`ffs\*(C'\fR, \f(CW\*(C`alloca\*(C'\fR, \f(CW\*(C`_exit\*(C'\fR,
\&\f(CW\*(C`index\*(C'\fR, \f(CW\*(C`bzero\*(C'\fR, \f(CW\*(C`conjf\*(C'\fR, and other related functions.
.Ip "\fB\-fno-operator-names\fR" 4
.IX Item "-fno-operator-names"
Do not treat the operator name keywords \f(CW\*(C`and\*(C'\fR, \f(CW\*(C`bitand\*(C'\fR,
......@@ -1277,6 +1297,10 @@ functions for use by the \*(C+ runtime type identification features
of the language, you can save some space by using this flag. Note that
exception handling uses the same information, but it will generate it as
needed.
.Ip "\fB\-fstats\fR" 4
.IX Item "-fstats"
Emit statistics about front-end processing at the end of the compilation.
This information is generally only useful to the G++ development team.
.Ip "\fB\-ftemplate-depth-\fR\fIn\fR" 4
.IX Item "-ftemplate-depth-n"
Set the maximum instantiation depth for template classes to \fIn\fR.
......@@ -1306,6 +1330,13 @@ those.
.Sp
Like all options that change the \s-1ABI\s0, all \*(C+ code, \fIincluding
libgcc.a\fR must be built with the same setting of this option.
.Ip "\fB\-fno-weak\fR" 4
.IX Item "-fno-weak"
Do not use weak symbol support, even if it is provied by the linker.
By default, G++ will use weak symbols if they are available. This
option exists only for testing, and should not be used by end-users;
it will result in inferior code and has no benefits. This option may
be removed in a future release of G++.
.Ip "\fB\-nostdinc++\fR" 4
.IX Item "-nostdinc++"
Do not search for header files in the standard directories specific to
......@@ -1428,6 +1459,46 @@ instance:
.Ve
In this example, g++ will synthesize a default \fBA& operator =
(const A&);\fR, while cfront will use the user-defined \fBoperator =\fR.
.Sh "Options Controlling Objective-C Dialect"
.IX Subsection "Options Controlling Objective-C Dialect"
This section describes the command-line options that are only meaningful
for Objective-C programs; but you can also use most of the \s-1GNU\s0 compiler
options regardless of what language your program is in. For example,
you might compile a file \f(CW\*(C`some_class.m\*(C'\fR like this:
.PP
.Vb 1
\& gcc -g -fgnu-runtime -O -c some_class.m
.Ve
In this example, only \fB\-fgnu-runtime\fR is an option meant only for
Objective-C programs; you can use the other options with any language
supported by \s-1GCC\s0.
.PP
Here is a list of options that are \fIonly\fR for compiling Objective-C
programs:
.Ip "\fB\-fconstant-string-class=\fR\fIclass name\fR" 4
.IX Item "-fconstant-string-class=class name"
Use \fIclass name\fR as the name of the class to instantiate for each
literal string specified with the syntax \f(CW\*(C`@"..."\*(C'\fR. The default
class name is \f(CW\*(C`NXConstantString\*(C'\fR.
.Ip "\fB\-fgnu-runtime\fR" 4
.IX Item "-fgnu-runtime"
Generate object code compatible with the standard \s-1GNU\s0 Objective-C
runtime. This is the default for most types of systems.
.Ip "\fB\-fnext-runtime\fR" 4
.IX Item "-fnext-runtime"
Generate output compatible with the NeXT runtime. This is the default
for NeXT-based systems, including Darwin and Mac \s-1OS\s0 X.
.Ip "\fB\-gen-decls\fR" 4
.IX Item "-gen-decls"
Dump interface declarations for all classes seen in the source file to a
file named \fI\fIsourcename\fI.decl\fR.
.Ip "\fB\-Wno-protocol\fR" 4
.IX Item "-Wno-protocol"
Do not warn if methods required by a protocol are not implemented
in the class adopting it.
.Ip "\fB\-Wselector\fR" 4
.IX Item "-Wselector"
Warn if a selector has multiple methods of different types defined.
.Sh "Options to Control Diagnostic Messages Formatting"
.IX Subsection "Options to Control Diagnostic Messages Formatting"
Traditionally, diagnostic messages have been formatted irrespective of
......@@ -1504,6 +1575,16 @@ A feature to report any failure to conform to \s-1ISO\s0 C might be useful in
some instances, but would require considerable additional work and would
be quite different from \fB\-pedantic\fR. We don't have plans to
support such a feature in the near future.
.Sp
Where the standard specified with \fB\-std\fR represents a \s-1GNU\s0
extended dialect of C, such as \fBgnu89\fR or \fBgnu99\fR, there is a
corresponding \fIbase standard\fR, the version of \s-1ISO\s0 C on which the \s-1GNU\s0
extended dialect is based. Warnings from \fB\-pedantic\fR are given
where they are required by the base standard. (It would not make sense
for such warnings to be given only for features not in the specified \s-1GNU\s0
C dialect, since by definition the \s-1GNU\s0 dialects of C include all
features the compiler supports with the given option, and there would be
nothing to warn about.)
.Ip "\fB\-pedantic-errors\fR" 4
.IX Item "-pedantic-errors"
Like \fB\-pedantic\fR, except that errors are produced rather than
......@@ -3227,17 +3308,33 @@ control some of these constants on the command-line using the
In each case, the \fIvalue\fR is a integer. The allowable choices for
\&\fIname\fR are given in the following table:
.RS 4
.Ip "\fBmax-inline-insns\fR" 4
.IX Item "max-inline-insns"
If an function contains more than this many instructions, it
will not be inlined. This option is precisely equivalent to
\&\fB\-finline-limit\fR.
.Ip "\fBmax-delay-slot-insn-search\fR" 4
.IX Item "max-delay-slot-insn-search"
The maximum number of instructions to consider when looking for an
instruction to fill a delay slot. If more than this arbitrary number of
instructions is searched, the time savings from filling the delay slot
will be minimal so stop searching. Increasing values mean more
aggressive optimization, making the compile time increase with probably
small improvement in executable run time.
.Ip "\fBmax-delay-slot-live-search\fR" 4
.IX Item "max-delay-slot-live-search"
When trying to fill delay slots, the maximum number of instructions to
consider when searching for a block with valid live register
information. Increasing this arbitrarily chosen value means more
aggressive optimization, increasing the compile time. This parameter
should be removed when the delay slot code is rewritten to maintain the
control-flow graph.
.Ip "\fBmax-gcse-memory\fR" 4
.IX Item "max-gcse-memory"
The approximate maximum amount of memory that will be allocated in
order to perform the global common subexpression elimination
optimization. If more memory than specified is required, the
optimization will not be done.
.Ip "\fBmax-inline-insns\fR" 4
.IX Item "max-inline-insns"
If an function contains more than this many instructions, it
will not be inlined. This option is precisely equivalent to
\&\fB\-finline-limit\fR.
.RE
.RS 4
.RE
......@@ -3547,10 +3644,16 @@ If any of these options is used, then the linker is not run, and
object file names should not be used as arguments.
.Ip "\fB\-l\fR\fIlibrary\fR" 4
.IX Item "-llibrary"
Search the library named \fIlibrary\fR when linking.
.PD 0
.Ip "\fB\-l\fR \fIlibrary\fR" 4
.IX Item "-l library"
.PD
Search the library named \fIlibrary\fR when linking. (The second
alternative with the library as a separate argument is only for
\&\s-1POSIX\s0 compliance and is not recommended.)
.Sp
It makes a difference where in the command you write this option; the
linker searches processes libraries and object files in the order they
linker searches and processes libraries and object files in the order they
are specified. Thus, \fBfoo.o \-lz bar.o\fR searches library \fBz\fR
after file \fIfoo.o\fR but before \fIbar.o\fR. If \fIbar.o\fR refers
to functions in \fBz\fR, those functions may not be loaded.
......@@ -4272,7 +4375,7 @@ overflow trap handler will properly handle this case as will interrupt
handlers.
.PP
These \fB\-m\fR switches are supported in addition to the above
on \s-1SPARC\s0 V9 processors in 64 bit environments.
on \s-1SPARC\s0 V9 processors in 64\-bit environments.
.Ip "\fB\-mlittle-endian\fR" 4
.IX Item "-mlittle-endian"
Generate code for a processor running in little-endian mode.
......@@ -4282,9 +4385,9 @@ Generate code for a processor running in little-endian mode.
.Ip "\fB\-m64\fR" 4
.IX Item "-m64"
.PD
Generate code for a 32 bit or 64 bit environment.
The 32 bit environment sets int, long and pointer to 32 bits.
The 64 bit environment sets int to 32 bits and long and pointer
Generate code for a 32\-bit or 64\-bit environment.
The 32\-bit environment sets int, long and pointer to 32 bits.
The 64\-bit environment sets int to 32 bits and long and pointer
to 64 bits.
.Ip "\fB\-mcmodel=medlow\fR" 4
.IX Item "-mcmodel=medlow"
......@@ -4306,9 +4409,9 @@ Pointers are 64 bits.
.Ip "\fB\-mcmodel=embmedany\fR" 4
.IX Item "-mcmodel=embmedany"
Generate code for the Medium/Anywhere code model for embedded systems:
assume a 32 bit text and a 32 bit data segment, both starting anywhere
assume a 32\-bit text and a 32\-bit data segment, both starting anywhere
(determined at link time). Register \f(CW%g4\fR points to the base of the
data segment. Pointers still 64 bits.
data segment. Pointers are still 64 bits.
Programs are statically linked, \s-1PIC\s0 is not supported.
.Ip "\fB\-mstack-bias\fR" 4
.IX Item "-mstack-bias"
......@@ -4845,12 +4948,12 @@ The addressability of a particular object can be set with the
\&\f(CW\*(C`model\*(C'\fR attribute.
.Ip "\fB\-mcode-model=medium\fR" 4
.IX Item "-mcode-model=medium"
Assume objects may be anywhere in the 32 bit address space (the compiler
Assume objects may be anywhere in the 32\-bit address space (the compiler
will generate \f(CW\*(C`seth/add3\*(C'\fR instructions to load their addresses), and
assume all subroutines are reachable with the \f(CW\*(C`bl\*(C'\fR instruction.
.Ip "\fB\-mcode-model=large\fR" 4
.IX Item "-mcode-model=large"
Assume objects may be anywhere in the 32 bit address space (the compiler
Assume objects may be anywhere in the 32\-bit address space (the compiler
will generate \f(CW\*(C`seth/add3\*(C'\fR instructions to load their addresses), and
assume subroutines may not be reachable with the \f(CW\*(C`bl\*(C'\fR instruction
(the compiler will generate the much slower \f(CW\*(C`seth/add3/jl\*(C'\fR
......@@ -5656,7 +5759,7 @@ root instructions). \fBr6000\fR is the default \fIcpu type\fR at this
\&\s-1ISA\s0 level.
.Ip "\fB\-mips3\fR" 4
.IX Item "-mips3"
Issue instructions from level 3 of the \s-1MIPS\s0 \s-1ISA\s0 (64 bit instructions).
Issue instructions from level 3 of the \s-1MIPS\s0 \s-1ISA\s0 (64\-bit instructions).
\&\fBr4000\fR is the default \fIcpu type\fR at this \s-1ISA\s0 level.
.Ip "\fB\-mips4\fR" 4
.IX Item "-mips4"
......@@ -6056,7 +6159,7 @@ These options are meaningful only on System V Release 3.
.IX Item "-mwide-multiply"
.PD
Control whether \s-1GCC\s0 uses the \f(CW\*(C`mul\*(C'\fR and \f(CW\*(C`imul\*(C'\fR that produce
64 bit results in \f(CW\*(C`eax:edx\*(C'\fR from 32 bit operands to do \f(CW\*(C`long
64\-bit results in \f(CW\*(C`eax:edx\*(C'\fR from 32\-bit operands to do \f(CW\*(C`long
long\*(C'\fR multiplies and 32\-bit division by constants.
.Ip "\fB\-mrtd\fR" 4
.IX Item "-mrtd"
......@@ -6094,26 +6197,6 @@ function by using the function attribute \fBregparm\fR.
\&\fInum\fR is nonzero, then you must build all modules with the same
value, including any libraries. This includes the system libraries and
startup modules.
.Ip "\fB\-malign-loops=\fR\fInum\fR" 4
.IX Item "-malign-loops=num"
Align loops to a 2 raised to a \fInum\fR byte boundary. If
\&\fB\-malign-loops\fR is not specified, the default is 2 unless
gas 2.8 (or later) is being used in which case the default is
to align the loop on a 16 byte boundary if it is less than 8
bytes away.
.Ip "\fB\-malign-jumps=\fR\fInum\fR" 4
.IX Item "-malign-jumps=num"
Align instructions that are only jumped to to a 2 raised to a \fInum\fR
byte boundary. If \fB\-malign-jumps\fR is not specified, the default is
2 if optimizing for a 386, and 4 if optimizing for a 486 unless
gas 2.8 (or later) is being used in which case the default is
to align the instruction on a 16 byte boundary if it is less
than 8 bytes away.
.Ip "\fB\-malign-functions=\fR\fInum\fR" 4
.IX Item "-malign-functions=num"
Align the start of functions to a 2 raised to \fInum\fR byte boundary.
If \fB\-malign-functions\fR is not specified, the default is 2 if optimizing
for a 386, and 4 if optimizing for a 486.
.Ip "\fB\-mpreferred-stack-boundary=\fR\fInum\fR" 4
.IX Item "-mpreferred-stack-boundary=num"
Attempt to keep the stack boundary aligned to a 2 raised to \fInum\fR
......@@ -6170,6 +6253,13 @@ By default \s-1GCC\s0 inlines string operations only when destination is known t
aligned at least to 4 byte boundary. This enables more inlining, increase code
size, but may improve performance of code that depends on fast memcpy, strlen
and memset for short lengths.
.Ip "\fB\-momit-leaf-frame-pointer\fR" 4
.IX Item "-momit-leaf-frame-pointer"
Don't keep the frame pointer in a register for leaf functions. This
avoids the instructions to save, set up and restore frame pointers and
makes an extra register available in leaf functions. The option
\&\fB\-fomit-frame-pointer\fR removes the frame pointer for all functions
which might make debugging harder.
.PP
.I "\s-1HPPA\s0 Options"
.IX Subsection "HPPA Options"
......@@ -6381,7 +6471,7 @@ These \fB\-m\fR options are defined for the \s-1DEC\s0 Alpha implementations:
.PD
Use (do not use) the hardware floating-point instructions for
floating-point operations. When \fB\-msoft-float\fR is specified,
functions in \fIlibgcc1.c\fR will be used to perform floating-point
functions in \fIlibgcc.a\fR will be used to perform floating-point
operations. Unless they are replaced by routines that emulate the
floating-point operations, or compiled in such a way as to call such
emulations routines, these routines will issue floating-point
......@@ -6724,7 +6814,7 @@ Compile code for the processor in big endian mode.
Compile code for the processor in little endian mode.
.Ip "\fB\-mdalign\fR" 4
.IX Item "-mdalign"
Align doubles at 64 bit boundaries. Note that this changes the calling
Align doubles at 64\-bit boundaries. Note that this changes the calling
conventions, and thus some functions from the standard C library will
not work unless you recompile it first with \-mdalign.
.Ip "\fB\-mrelax\fR" 4
......
......@@ -1695,6 +1695,16 @@ some instances, but would require considerable additional work and would
be quite different from @samp{-pedantic}. We don't have plans to
support such a feature in the near future.
Where the standard specified with @option{-std} represents a GNU
extended dialect of C, such as @samp{gnu89} or @samp{gnu99}, there is a
corresponding @dfn{base standard}, the version of ISO C on which the GNU
extended dialect is based. Warnings from @option{-pedantic} are given
where they are required by the base standard. (It would not make sense
for such warnings to be given only for features not in the specified GNU
C dialect, since by definition the GNU dialects of C include all
features the compiler supports with the given option, and there would be
nothing to warn about.)
@item -pedantic-errors
Like @samp{-pedantic}, except that errors are produced rather than
warnings.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment