From: Jonathan Wakely Date: Wed, 23 Mar 2011 21:12:51 +0000 (+0000) Subject: re PR other/48179 (Reference mismatch in documentation chapter 6) X-Git-Tag: releases/gcc-4.5.3~134 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0bb0a5a453606056b3cdaf76581eab7d1eba9a14;p=thirdparty%2Fgcc.git re PR other/48179 (Reference mismatch in documentation chapter 6) 2011-03-23 Jonathan Wakely PR other/48179 PR other/48234 * doc/extend.texi (Alignment): Move section to match order in TOC. * doc/invoke.texi (i386 and x86-64 Windows Options): Likewise. From-SVN: r171363 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 9a7518722da2..84703580de30 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2011-03-23 Jonathan Wakely + + PR other/48179 + PR other/48234 + * doc/extend.texi (Alignment): Move section to match order in TOC. + * doc/invoke.texi (i386 and x86-64 Windows Options): Likewise. + 2011-03-18 H.J. Lu Backport from mainline diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi index 18f8578e5e15..e0382b06a14b 100644 --- a/gcc/doc/extend.texi +++ b/gcc/doc/extend.texi @@ -3855,42 +3855,6 @@ machines, typically because the target assembler does not allow them. You can use the sequence @samp{\e} in a string or character constant to stand for the ASCII character @key{ESC}. -@node Alignment -@section Inquiring on Alignment of Types or Variables -@cindex alignment -@cindex type alignment -@cindex variable alignment - -The keyword @code{__alignof__} allows you to inquire about how an object -is aligned, or the minimum alignment usually required by a type. Its -syntax is just like @code{sizeof}. - -For example, if the target machine requires a @code{double} value to be -aligned on an 8-byte boundary, then @code{__alignof__ (double)} is 8. -This is true on many RISC machines. On more traditional machine -designs, @code{__alignof__ (double)} is 4 or even 2. - -Some machines never actually require alignment; they allow reference to any -data type even at an odd address. For these machines, @code{__alignof__} -reports the smallest alignment that GCC will give the data type, usually as -mandated by the target ABI. - -If the operand of @code{__alignof__} is an lvalue rather than a type, -its value is the required alignment for its type, taking into account -any minimum alignment specified with GCC's @code{__attribute__} -extension (@pxref{Variable Attributes}). For example, after this -declaration: - -@smallexample -struct foo @{ int x; char y; @} foo1; -@end smallexample - -@noindent -the value of @code{__alignof__ (foo1.y)} is 1, even though its actual -alignment is probably 2 or 4, the same as @code{__alignof__ (int)}. - -It is an error to ask for the alignment of an incomplete type. - @node Variable Attributes @section Specifying Attributes of Variables @cindex attribute of variables @@ -4899,6 +4863,42 @@ allows one to declare vector data types supported by the Sony/Toshiba/IBM SPU Language Extensions Specification. It is intended to support the @code{__vector} keyword. +@node Alignment +@section Inquiring on Alignment of Types or Variables +@cindex alignment +@cindex type alignment +@cindex variable alignment + +The keyword @code{__alignof__} allows you to inquire about how an object +is aligned, or the minimum alignment usually required by a type. Its +syntax is just like @code{sizeof}. + +For example, if the target machine requires a @code{double} value to be +aligned on an 8-byte boundary, then @code{__alignof__ (double)} is 8. +This is true on many RISC machines. On more traditional machine +designs, @code{__alignof__ (double)} is 4 or even 2. + +Some machines never actually require alignment; they allow reference to any +data type even at an odd address. For these machines, @code{__alignof__} +reports the smallest alignment that GCC will give the data type, usually as +mandated by the target ABI. + +If the operand of @code{__alignof__} is an lvalue rather than a type, +its value is the required alignment for its type, taking into account +any minimum alignment specified with GCC's @code{__attribute__} +extension (@pxref{Variable Attributes}). For example, after this +declaration: + +@smallexample +struct foo @{ int x; char y; @} foo1; +@end smallexample + +@noindent +the value of @code{__alignof__ (foo1.y)} is 1, even though its actual +alignment is probably 2 or 4, the same as @code{__alignof__ (int)}. + +It is an error to ask for the alignment of an incomplete type. + @node Inline @section An Inline Function is As Fast As a Macro diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 55e9b4edd848..2ad2a60e3580 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -604,6 +604,11 @@ Objective-C and Objective-C++ Dialects}. -m32 -m64 -mlarge-data-threshold=@var{num} @gol -msse2avx} +@emph{i386 and x86-64 Windows Options} +@gccoptlist{-mconsole -mcygwin -mno-cygwin -mdll +-mnop-fun-dllimport -mthread -municode -mwin32 -mwindows +-fno-set-stack-executable} + @emph{IA-64 Options} @gccoptlist{-mbig-endian -mlittle-endian -mgnu-as -mgnu-ld -mno-pic @gol -mvolatile-asm-stop -mregister-names -msdata -mno-sdata @gol @@ -880,11 +885,6 @@ See RS/6000 and PowerPC Options. @emph{x86-64 Options} See i386 and x86-64 Options. -@emph{i386 and x86-64 Windows Options} -@gccoptlist{-mconsole -mcygwin -mno-cygwin -mdll --mnop-fun-dllimport -mthread -municode -mwin32 -mwindows --fno-set-stack-executable} - @emph{Xstormy16 Options} @gccoptlist{-msim} @@ -12339,6 +12339,94 @@ Generate code for the large model: This model makes no assumptions about addresses and sizes of sections. @end table +@node i386 and x86-64 Windows Options +@subsection i386 and x86-64 Windows Options +@cindex i386 and x86-64 Windows Options + +These additional options are available for Windows targets: + +@table @gcctabopt +@item -mconsole +@opindex mconsole +This option is available for Cygwin and MinGW targets. It +specifies that a console application is to be generated, by +instructing the linker to set the PE header subsystem type +required for console applications. +This is the default behavior for Cygwin and MinGW targets. + +@item -mcygwin +@opindex mcygwin +This option is available for Cygwin targets. It specifies that +the Cygwin internal interface is to be used for predefined +preprocessor macros, C runtime libraries and related linker +paths and options. For Cygwin targets this is the default behavior. +This option is deprecated and will be removed in a future release. + +@item -mno-cygwin +@opindex mno-cygwin +This option is available for Cygwin targets. It specifies that +the MinGW internal interface is to be used instead of Cygwin's, by +setting MinGW-related predefined macros and linker paths and default +library options. +This option is deprecated and will be removed in a future release. + +@item -mdll +@opindex mdll +This option is available for Cygwin and MinGW targets. It +specifies that a DLL - a dynamic link library - is to be +generated, enabling the selection of the required runtime +startup object and entry point. + +@item -mnop-fun-dllimport +@opindex mnop-fun-dllimport +This option is available for Cygwin and MinGW targets. It +specifies that the dllimport attribute should be ignored. + +@item -mthread +@opindex mthread +This option is available for MinGW targets. It specifies +that MinGW-specific thread support is to be used. + +@item -municode +@opindex municode +This option is available for mingw-w64 targets. It specifies +that the UNICODE macro is getting pre-defined and that the +unicode capable runtime startup code is chosen. + +@item -mwin32 +@opindex mwin32 +This option is available for Cygwin and MinGW targets. It +specifies that the typical Windows pre-defined macros are to +be set in the pre-processor, but does not influence the choice +of runtime library/startup code. + +@item -mwindows +@opindex mwindows +This option is available for Cygwin and MinGW targets. It +specifies that a GUI application is to be generated by +instructing the linker to set the PE header subsystem type +appropriately. + +@item -fno-set-stack-executable +@opindex fno-set-stack-executable +This option is available for MinGW targets. It specifies that +the executable flag for stack used by nested functions isn't +set. This is necessary for binaries running in kernel mode of +Windows, as there the user32 API, which is used to set executable +privileges, isn't available. + +@item -mpe-aligned-commons +@opindex mpe-aligned-commons +This option is available for Cygwin and MinGW targets. It +specifies that the GNU extension to the PE file format that +permits the correct alignment of COMMON variables should be +used when generating code. It will be enabled by default if +GCC detects that the target assembler found during configuration +supports the feature. +@end table + +See also under @ref{i386 and x86-64 Options} for standard options. + @node IA-64 Options @subsection IA-64 Options @cindex IA-64 Options @@ -16812,94 +16900,6 @@ is defined for compatibility with Diab. These are listed under @xref{i386 and x86-64 Options}. -@node i386 and x86-64 Windows Options -@subsection i386 and x86-64 Windows Options -@cindex i386 and x86-64 Windows Options - -These additional options are available for Windows targets: - -@table @gcctabopt -@item -mconsole -@opindex mconsole -This option is available for Cygwin and MinGW targets. It -specifies that a console application is to be generated, by -instructing the linker to set the PE header subsystem type -required for console applications. -This is the default behavior for Cygwin and MinGW targets. - -@item -mcygwin -@opindex mcygwin -This option is available for Cygwin targets. It specifies that -the Cygwin internal interface is to be used for predefined -preprocessor macros, C runtime libraries and related linker -paths and options. For Cygwin targets this is the default behavior. -This option is deprecated and will be removed in a future release. - -@item -mno-cygwin -@opindex mno-cygwin -This option is available for Cygwin targets. It specifies that -the MinGW internal interface is to be used instead of Cygwin's, by -setting MinGW-related predefined macros and linker paths and default -library options. -This option is deprecated and will be removed in a future release. - -@item -mdll -@opindex mdll -This option is available for Cygwin and MinGW targets. It -specifies that a DLL - a dynamic link library - is to be -generated, enabling the selection of the required runtime -startup object and entry point. - -@item -mnop-fun-dllimport -@opindex mnop-fun-dllimport -This option is available for Cygwin and MinGW targets. It -specifies that the dllimport attribute should be ignored. - -@item -mthread -@opindex mthread -This option is available for MinGW targets. It specifies -that MinGW-specific thread support is to be used. - -@item -municode -@opindex municode -This option is available for mingw-w64 targets. It specifies -that the UNICODE macro is getting pre-defined and that the -unicode capable runtime startup code is chosen. - -@item -mwin32 -@opindex mwin32 -This option is available for Cygwin and MinGW targets. It -specifies that the typical Windows pre-defined macros are to -be set in the pre-processor, but does not influence the choice -of runtime library/startup code. - -@item -mwindows -@opindex mwindows -This option is available for Cygwin and MinGW targets. It -specifies that a GUI application is to be generated by -instructing the linker to set the PE header subsystem type -appropriately. - -@item -fno-set-stack-executable -@opindex fno-set-stack-executable -This option is available for MinGW targets. It specifies that -the executable flag for stack used by nested functions isn't -set. This is necessary for binaries running in kernel mode of -Windows, as there the user32 API, which is used to set executable -privileges, isn't available. - -@item -mpe-aligned-commons -@opindex mpe-aligned-commons -This option is available for Cygwin and MinGW targets. It -specifies that the GNU extension to the PE file format that -permits the correct alignment of COMMON variables should be -used when generating code. It will be enabled by default if -GCC detects that the target assembler found during configuration -supports the feature. -@end table - -See also under @ref{i386 and x86-64 Options} for standard options. - @node Xstormy16 Options @subsection Xstormy16 Options @cindex Xstormy16 Options