From a9c60612ab729d36a4499da90ac10087ccc818ba Mon Sep 17 00:00:00 2001 From: Janis Johnson Date: Wed, 4 Sep 2002 16:36:45 +0000 Subject: [PATCH] invoke.texi (-fshort-wchar): Move to Code Generation Options. 2002-09-04 Janis Johnson * doc/invoke.texi (-fshort-wchar): Move to Code Generation Options. (-fpcc-struct-return, -freg-struct-return, -fshort-enums, -fshort-double, -fshort-wchar, -fpack-struct, -fleading-underscore): Warn that these options can break ABI compatibility. From-SVN: r56799 --- gcc/ChangeLog | 7 ++++++ gcc/doc/invoke.texi | 56 +++++++++++++++++++++++++++++++++------------ 2 files changed, 49 insertions(+), 14 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a289e8aff32..0778a30aa5d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2002-09-04 Janis Johnson + + * doc/invoke.texi (-fshort-wchar): Move to Code Generation Options. + (-fpcc-struct-return, -freg-struct-return, -fshort-enums, + -fshort-double, -fshort-wchar, -fpack-struct, -fleading-underscore): + Warn that these options can break ABI compatibility. + 2002-09-04 Richard Henderson * real.c (ereal_to_decimal): Add digits parameter. diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 2ab40692835..adc9de8c156 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -169,7 +169,7 @@ in the following sections. -fallow-single-precision -fcond-mismatch @gol -fsigned-bitfields -fsigned-char @gol -funsigned-bitfields -funsigned-char @gol --fwritable-strings -fshort-wchar} +-fwritable-strings} @item C++ Language Options @xref{C++ Dialect Options,,Options Controlling C++ Dialect}. @@ -679,7 +679,7 @@ in the following sections. -fno-common -fno-ident -fno-gnu-linker @gol -fpcc-struct-return -fpic -fPIC @gol -freg-struct-return -fshared-data -fshort-enums @gol --fshort-double -fvolatile @gol +-fshort-double -fshort-wchar -fvolatile @gol -fvolatile-global -fvolatile-static @gol -fverbose-asm -fpack-struct -fstack-check @gol -fstack-limit-register=@var{reg} -fstack-limit-symbol=@var{sym} @gol @@ -1221,12 +1221,6 @@ write into string constants. Writing into string constants is a very bad idea; ``constants'' should be constant. - -@item -fshort-wchar -@opindex fshort-wchar -Override the underlying type for @samp{wchar_t} to be @samp{short -unsigned int} instead of the default for the target. This option is -useful for building programs to run under WINE@. @end table @node C++ Dialect Options @@ -9893,7 +9887,8 @@ unwinding from asynchronous events (such as debugger or garbage collector). Return ``short'' @code{struct} and @code{union} values in memory like longer ones, rather than in registers. This convention is less efficient, but it has the advantage of allowing intercallability between -GCC-compiled files and files compiled with other compilers. +GCC-compiled files and files compiled with other compilers, particularly +the Portable C Compiler (pcc). The precise convention for returning structures in memory depends on the target configuration macros. @@ -9901,6 +9896,11 @@ on the target configuration macros. Short structures and unions are those whose size and alignment match that of some integer type. +@strong{Warning:} code compiled with the @option{-fpcc-struct-return} +switch is not binary compatible with code compiled with the +@option{-freg-struct-return} switch. +Use it to conform to a non-default application binary interface. + @item -freg-struct-return @opindex freg-struct-return Return @code{struct} and @code{union} values in registers when possible. @@ -9914,16 +9914,39 @@ defaults to @option{-fpcc-struct-return}, except on targets where GCC is the principal compiler. In those cases, we can choose the standard, and we chose the more efficient register return alternative. +@strong{Warning:} code compiled with the @option{-freg-struct-return} +switch is not binary compatible with code compiled with the +@option{-fpcc-struct-return} switch. +Use it to conform to a non-default application binary interface. + @item -fshort-enums @opindex fshort-enums Allocate to an @code{enum} type only as many bytes as it needs for the declared range of possible values. Specifically, the @code{enum} type will be equivalent to the smallest integer type which has enough room. +@strong{Warning:} the @option{-fshort-enums} switch causes GCC to generate +code that is not binary compatible with code generated without that switch. +Use it to conform to a non-default application binary interface. + @item -fshort-double @opindex fshort-double Use the same size for @code{double} as for @code{float}. +@strong{Warning:} the @option{-fshort-double} switch causes GCC to generate +code that is not binary compatible with code generated without that switch. +Use it to conform to a non-default application binary interface. + +@item -fshort-wchar +@opindex fshort-wchar +Override the underlying type for @samp{wchar_t} to be @samp{short +unsigned int} instead of the default for the target. This option is +useful for building programs to run under WINE@. + +@strong{Warning:} the @option{-fshort-wchar} switch causes GCC to generate +code that is not binary compatible with code generated without that switch. +Use it to conform to a non-default application binary interface. + @item -fshared-data @opindex fshared-data Requests that the data and non-@code{const} variables of this @@ -10065,9 +10088,12 @@ three-way choice. @item -fpack-struct @opindex fpack-struct -Pack all structure members together without holes. Usually you would -not want to use this option, since it makes the code suboptimal, and -the offsets of structure members won't agree with system libraries. +Pack all structure members together without holes. + +@strong{Warning:} the @option{-fpack-struct} switch causes GCC to generate +code that is not binary compatible with code generated without that switch. +Additionally, it makes the code suboptimial. +Use it to conform to a non-default application binary interface. @item -finstrument-functions @opindex finstrument-functions @@ -10164,8 +10190,10 @@ This option and its counterpart, @option{-fno-leading-underscore}, forcibly change the way C symbols are represented in the object file. One use is to help link with legacy assembly code. -Be warned that you should know what you are doing when invoking this -option, and that not all targets provide complete support for it. +@strong{Warning:} the @option{-fleading-underscore} switch causes GCC to +generate code that is not binary compatible with code generated without that +switch. Use it to conform to a non-default application binary interface. +Not all targets provide complete support for this switch. @item -ftls-model=@var{model} Alter the thread-local storage model to be used (@pxref{Thread-Local}).