1 From e2965db317ee7efd916963c87b9c34023eefda54 Mon Sep 17 00:00:00 2001
2 From: redi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>
3 Date: Sun, 27 Mar 2011 20:08:35 +0000
4 Subject: [PATCH 012/200] 2011-03-27 Jonathan Wakely <jwakely.gcc@gmail.com>
9 * doc/extend.texi (Alignment): Move section to match order in TOC.
10 * doc/invoke.texi (i386 and x86-64 Windows Options): Likewise.
11 (Warning Options): Adjust -Wno-cpp summary and remove stray backslash.
15 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@171581 138bc75d-0d04-0410-961f-82ee72b054a4
17 index c897101..998d703 100644
18 --- a/gcc/doc/extend.texi
19 +++ b/gcc/doc/extend.texi
20 @@ -4180,42 +4180,6 @@ machines, typically because the target assembler does not allow them.
21 You can use the sequence @samp{\e} in a string or character constant to
22 stand for the ASCII character @key{ESC}.
25 -@section Inquiring on Alignment of Types or Variables
27 -@cindex type alignment
28 -@cindex variable alignment
30 -The keyword @code{__alignof__} allows you to inquire about how an object
31 -is aligned, or the minimum alignment usually required by a type. Its
32 -syntax is just like @code{sizeof}.
34 -For example, if the target machine requires a @code{double} value to be
35 -aligned on an 8-byte boundary, then @code{__alignof__ (double)} is 8.
36 -This is true on many RISC machines. On more traditional machine
37 -designs, @code{__alignof__ (double)} is 4 or even 2.
39 -Some machines never actually require alignment; they allow reference to any
40 -data type even at an odd address. For these machines, @code{__alignof__}
41 -reports the smallest alignment that GCC will give the data type, usually as
42 -mandated by the target ABI.
44 -If the operand of @code{__alignof__} is an lvalue rather than a type,
45 -its value is the required alignment for its type, taking into account
46 -any minimum alignment specified with GCC's @code{__attribute__}
47 -extension (@pxref{Variable Attributes}). For example, after this
51 -struct foo @{ int x; char y; @} foo1;
55 -the value of @code{__alignof__ (foo1.y)} is 1, even though its actual
56 -alignment is probably 2 or 4, the same as @code{__alignof__ (int)}.
58 -It is an error to ask for the alignment of an incomplete type.
60 @node Variable Attributes
61 @section Specifying Attributes of Variables
62 @cindex attribute of variables
63 @@ -5224,6 +5188,42 @@ allows one to declare vector data types supported by the Sony/Toshiba/IBM SPU
64 Language Extensions Specification. It is intended to support the
65 @code{__vector} keyword.
68 +@section Inquiring on Alignment of Types or Variables
70 +@cindex type alignment
71 +@cindex variable alignment
73 +The keyword @code{__alignof__} allows you to inquire about how an object
74 +is aligned, or the minimum alignment usually required by a type. Its
75 +syntax is just like @code{sizeof}.
77 +For example, if the target machine requires a @code{double} value to be
78 +aligned on an 8-byte boundary, then @code{__alignof__ (double)} is 8.
79 +This is true on many RISC machines. On more traditional machine
80 +designs, @code{__alignof__ (double)} is 4 or even 2.
82 +Some machines never actually require alignment; they allow reference to any
83 +data type even at an odd address. For these machines, @code{__alignof__}
84 +reports the smallest alignment that GCC will give the data type, usually as
85 +mandated by the target ABI.
87 +If the operand of @code{__alignof__} is an lvalue rather than a type,
88 +its value is the required alignment for its type, taking into account
89 +any minimum alignment specified with GCC's @code{__attribute__}
90 +extension (@pxref{Variable Attributes}). For example, after this
94 +struct foo @{ int x; char y; @} foo1;
98 +the value of @code{__alignof__ (foo1.y)} is 1, even though its actual
99 +alignment is probably 2 or 4, the same as @code{__alignof__ (int)}.
101 +It is an error to ask for the alignment of an incomplete type.
105 @section An Inline Function is As Fast As a Macro
106 diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
107 index f4cdf66..5478f79 100644
108 --- a/gcc/doc/invoke.texi
109 +++ b/gcc/doc/invoke.texi
110 @@ -237,7 +237,7 @@ Objective-C and Objective-C++ Dialects}.
111 -Wno-attributes -Wno-builtin-macro-redefined @gol
112 -Wc++-compat -Wc++0x-compat -Wcast-align -Wcast-qual @gol
113 -Wchar-subscripts -Wclobbered -Wcomment @gol
114 --Wconversion -Wcoverage-mismatch -Wcpp -Wno-deprecated @gol
115 +-Wconversion -Wcoverage-mismatch -Wno-cpp -Wno-deprecated @gol
116 -Wno-deprecated-declarations -Wdisabled-optimization @gol
117 -Wno-div-by-zero -Wdouble-promotion -Wempty-body -Wenum-compare @gol
118 -Wno-endif-labels -Werror -Werror=* @gol
119 @@ -613,6 +613,11 @@ Objective-C and Objective-C++ Dialects}.
120 -m32 -m64 -mlarge-data-threshold=@var{num} @gol
121 -msse2avx -mfentry -m8bit-idiv}
123 +@emph{i386 and x86-64 Windows Options}
124 +@gccoptlist{-mconsole -mcygwin -mno-cygwin -mdll
125 +-mnop-fun-dllimport -mthread @gol
126 +-municode -mwin32 -mwindows -fno-set-stack-executable}
129 @gccoptlist{-mbig-endian -mlittle-endian -mgnu-as -mgnu-ld -mno-pic @gol
130 -mvolatile-asm-stop -mregister-names -msdata -mno-sdata @gol
131 @@ -906,11 +911,6 @@ See RS/6000 and PowerPC Options.
132 @emph{x86-64 Options}
133 See i386 and x86-64 Options.
135 -@emph{i386 and x86-64 Windows Options}
136 -@gccoptlist{-mconsole -mcygwin -mno-cygwin -mdll
137 --mnop-fun-dllimport -mthread @gol
138 --municode -mwin32 -mwindows -fno-set-stack-executable}
140 @emph{Xstormy16 Options}
143 @@ -3045,7 +3045,7 @@ Warn whenever a comment-start sequence @samp{/*} appears in a @samp{/*}
144 comment, or whenever a Backslash-Newline appears in a @samp{//} comment.
145 This warning is enabled by @option{-Wall}.
149 @r{(C, Objective-C, C++, Objective-C++ and Fortran only)}
151 Suppress warning messages emitted by @code{#warning} directives.
152 @@ -12815,6 +12815,78 @@ Generate code for the large model: This model makes no assumptions
153 about addresses and sizes of sections.
156 +@node i386 and x86-64 Windows Options
157 +@subsection i386 and x86-64 Windows Options
158 +@cindex i386 and x86-64 Windows Options
160 +These additional options are available for Windows targets:
165 +This option is available for Cygwin and MinGW targets. It
166 +specifies that a console application is to be generated, by
167 +instructing the linker to set the PE header subsystem type
168 +required for console applications.
169 +This is the default behavior for Cygwin and MinGW targets.
173 +This option is available for Cygwin and MinGW targets. It
174 +specifies that a DLL - a dynamic link library - is to be
175 +generated, enabling the selection of the required runtime
176 +startup object and entry point.
178 +@item -mnop-fun-dllimport
179 +@opindex mnop-fun-dllimport
180 +This option is available for Cygwin and MinGW targets. It
181 +specifies that the dllimport attribute should be ignored.
185 +This option is available for MinGW targets. It specifies
186 +that MinGW-specific thread support is to be used.
190 +This option is available for mingw-w64 targets. It specifies
191 +that the UNICODE macro is getting pre-defined and that the
192 +unicode capable runtime startup code is chosen.
196 +This option is available for Cygwin and MinGW targets. It
197 +specifies that the typical Windows pre-defined macros are to
198 +be set in the pre-processor, but does not influence the choice
199 +of runtime library/startup code.
203 +This option is available for Cygwin and MinGW targets. It
204 +specifies that a GUI application is to be generated by
205 +instructing the linker to set the PE header subsystem type
208 +@item -fno-set-stack-executable
209 +@opindex fno-set-stack-executable
210 +This option is available for MinGW targets. It specifies that
211 +the executable flag for stack used by nested functions isn't
212 +set. This is necessary for binaries running in kernel mode of
213 +Windows, as there the user32 API, which is used to set executable
214 +privileges, isn't available.
216 +@item -mpe-aligned-commons
217 +@opindex mpe-aligned-commons
218 +This option is available for Cygwin and MinGW targets. It
219 +specifies that the GNU extension to the PE file format that
220 +permits the correct alignment of COMMON variables should be
221 +used when generating code. It will be enabled by default if
222 +GCC detects that the target assembler found during configuration
223 +supports the feature.
226 +See also under @ref{i386 and x86-64 Options} for standard options.
229 @subsection IA-64 Options
230 @cindex IA-64 Options
231 @@ -17541,78 +17613,6 @@ is defined for compatibility with Diab.
233 These are listed under @xref{i386 and x86-64 Options}.
235 -@node i386 and x86-64 Windows Options
236 -@subsection i386 and x86-64 Windows Options
237 -@cindex i386 and x86-64 Windows Options
239 -These additional options are available for Windows targets:
244 -This option is available for Cygwin and MinGW targets. It
245 -specifies that a console application is to be generated, by
246 -instructing the linker to set the PE header subsystem type
247 -required for console applications.
248 -This is the default behavior for Cygwin and MinGW targets.
252 -This option is available for Cygwin and MinGW targets. It
253 -specifies that a DLL - a dynamic link library - is to be
254 -generated, enabling the selection of the required runtime
255 -startup object and entry point.
257 -@item -mnop-fun-dllimport
258 -@opindex mnop-fun-dllimport
259 -This option is available for Cygwin and MinGW targets. It
260 -specifies that the dllimport attribute should be ignored.
264 -This option is available for MinGW targets. It specifies
265 -that MinGW-specific thread support is to be used.
269 -This option is available for mingw-w64 targets. It specifies
270 -that the UNICODE macro is getting pre-defined and that the
271 -unicode capable runtime startup code is chosen.
275 -This option is available for Cygwin and MinGW targets. It
276 -specifies that the typical Windows pre-defined macros are to
277 -be set in the pre-processor, but does not influence the choice
278 -of runtime library/startup code.
282 -This option is available for Cygwin and MinGW targets. It
283 -specifies that a GUI application is to be generated by
284 -instructing the linker to set the PE header subsystem type
287 -@item -fno-set-stack-executable
288 -@opindex fno-set-stack-executable
289 -This option is available for MinGW targets. It specifies that
290 -the executable flag for stack used by nested functions isn't
291 -set. This is necessary for binaries running in kernel mode of
292 -Windows, as there the user32 API, which is used to set executable
293 -privileges, isn't available.
295 -@item -mpe-aligned-commons
296 -@opindex mpe-aligned-commons
297 -This option is available for Cygwin and MinGW targets. It
298 -specifies that the GNU extension to the PE file format that
299 -permits the correct alignment of COMMON variables should be
300 -used when generating code. It will be enabled by default if
301 -GCC detects that the target assembler found during configuration
302 -supports the feature.
305 -See also under @ref{i386 and x86-64 Options} for standard options.
307 @node Xstormy16 Options
308 @subsection Xstormy16 Options
309 @cindex Xstormy16 Options