aboutsummaryrefslogtreecommitdiff
path: root/gcc/doc/invoke.texi
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/doc/invoke.texi')
-rw-r--r--gcc/doc/invoke.texi31
1 files changed, 28 insertions, 3 deletions
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 32b9c48..07a21fd 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -257,7 +257,8 @@ in the following sections.
-Wdeprecated-copy -Wdeprecated-copy-dtor
-Wno-deprecated-enum-enum-conversion -Wno-deprecated-enum-float-conversion
-Weffc++ -Wno-elaborated-enum-base
--Wno-exceptions -Wextra-semi -Wno-global-module -Wno-inaccessible-base
+-Wno-exceptions -Wno-expose-global-module-tu-local -Wno-external-tu-local
+-Wextra-semi -Wno-global-module -Wno-inaccessible-base
-Wno-inherited-variadic-ctor -Wno-init-list-lifetime
-Winvalid-constexpr -Winvalid-imported-macros
-Wno-invalid-offsetof -Wno-literal-suffix
@@ -272,7 +273,7 @@ in the following sections.
-Woverloaded-virtual -Wno-pmf-conversions -Wself-move -Wsign-promo
-Wsized-deallocation -Wsuggest-final-methods
-Wsuggest-final-types -Wsuggest-override -Wno-template-body
--Wno-template-id-cdtor -Wtemplate-names-tu-local -Wno-external-tu-local
+-Wno-template-id-cdtor -Wtemplate-names-tu-local
-Wno-terminate -Wno-vexing-parse -Wvirtual-inheritance
-Wno-virtual-move-assign -Wvolatile}
@@ -4759,6 +4760,29 @@ The presence of an explicit instantiation silences the warning.
This flag is enabled by @option{-Wextra}.
+@opindex Wexpose-global-module-tu-local
+@opindex Wno-expose-global-module-tu-local
+@item -Wno-expose-global-module-tu-local
+An exposure of a translation-unit-local entity from a module interface is
+invalid, as this may cause ODR violations and manifest in link errors or other
+unexpected behaviour. However, many existing libraries declare TU-local
+entities in their interface, and avoiding exposures of these entities may be
+difficult in some cases.
+
+As an extension, GCC allows exposures of internal variables and functions that
+were declared in the global module fragment. This warning indicates when such
+an invalid exposure has occurred, and can be silenced using diagnostic pragmas
+either at the site of the exposure, or at the point of declaration of the
+internal declaration.
+
+When combined with @option{-Wtemplate-names-tu-local}, GCC will also warn about
+non-exposure references to TU-local entities in template bodies. Such templates
+can still be instantiated in other TUs but the above risks regarding exposures
+of translation-unit-local entities apply.
+
+This warning is enabled by default, and is upgraded to an error by
+@option{-pedantic-errors}.
+
@opindex Wexternal-tu-local
@opindex Wno-external-tu-local
@item -Wno-external-tu-local
@@ -28520,6 +28544,8 @@ be within 2GB addressing space.
@item medium
The text segment and data segment must be within 2GB addressing space.
+This is the default code model unless GCC has been configured with
+@option{--with-cmodel=} specifying a different default code model.
@item large (Not implemented yet)
@@ -28528,7 +28554,6 @@ This mode does not limit the size of the code segment and data segment.
The @option{-mcmodel=extreme} option is incompatible with @option{-fplt}
and/or @option{-mexplicit-relocs=none}.
@end table
-The default code model is @code{normal}.
@item -mexplicit-relocs=@var{style}
Set when to use assembler relocation operators when dealing with symbolic