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