aboutsummaryrefslogtreecommitdiff
path: root/gcc/doc
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2021-05-24 11:39:52 +0200
committerMartin Liska <mliska@suse.cz>2021-05-24 11:39:52 +0200
commita06bc9f78ddd15073bf7fa8386e1a97ac80655bb (patch)
treef0439435ed433ccd0eb1eebfaa4eaf250793d7f1 /gcc/doc
parent905b28242c5afcf0a46d74580f800c3b0bd1f6ae (diff)
parent0f3cd532fa02d1787960bdd380d0a3f78343f024 (diff)
downloadgcc-a06bc9f78ddd15073bf7fa8386e1a97ac80655bb.zip
gcc-a06bc9f78ddd15073bf7fa8386e1a97ac80655bb.tar.gz
gcc-a06bc9f78ddd15073bf7fa8386e1a97ac80655bb.tar.bz2
Merge branch 'master' into devel/sphinx
Diffstat (limited to 'gcc/doc')
-rw-r--r--gcc/doc/cpp.texi19
-rw-r--r--gcc/doc/invoke.texi52
-rw-r--r--gcc/doc/sourcebuild.texi26
-rw-r--r--gcc/doc/tm.texi26
-rw-r--r--gcc/doc/tm.texi.in4
5 files changed, 119 insertions, 8 deletions
diff --git a/gcc/doc/cpp.texi b/gcc/doc/cpp.texi
index fd12af9..7272eb0 100644
--- a/gcc/doc/cpp.texi
+++ b/gcc/doc/cpp.texi
@@ -1929,6 +1929,13 @@ This macro expands to the name of the main input file, in the form
of a C string constant. This is the source file that was specified
on the command line of the preprocessor or C compiler.
+@item __FILE_NAME__
+This macro expands to the basename of the current input file, in the
+form of a C string constant. This is the last path component by which
+the preprocessor opened the file. For example, processing
+@code{"/usr/local/include/myheader.h"} would set this
+macro to @code{"myheader.h"}.
+
@item __INCLUDE_LEVEL__
This macro expands to a decimal integer constant that represents the
depth of nesting in include files. The value of this macro is
@@ -2236,11 +2243,13 @@ mechanism based on @code{setjmp} and @code{longjmp} for exception
handling.
@item __GXX_EXPERIMENTAL_CXX0X__
-This macro is defined when compiling a C++ source file with the option
-@option{-std=c++0x} or @option{-std=gnu++0x}. It indicates that some
-features likely to be included in C++0x are available. Note that these
-features are experimental, and may change or be removed in future
-versions of GCC.
+This macro is defined when compiling a C++ source file with C++11 features
+enabled, i.e., for all C++ language dialects except @option{-std=c++98}
+and @option{-std=gnu++98}. This macro is obsolete, but can be used to
+detect experimental C++0x features in very old versions of GCC. Since
+GCC 4.7.0 the @code{__cplusplus} macro is defined correctly, so most
+code should test @code{__cplusplus >= 201103L} instead of using this
+macro.
@item __GXX_WEAK__
This macro is defined when compiling a C++ source file. It has the
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index a0c9bb2..4b4699f 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -330,7 +330,9 @@ Objective-C and Objective-C++ Dialects}.
-Wno-builtin-macro-redefined -Wc90-c99-compat -Wc99-c11-compat @gol
-Wc11-c2x-compat @gol
-Wc++-compat -Wc++11-compat -Wc++14-compat -Wc++17-compat @gol
--Wc++20-compat @gol
+-Wc++20-compat @gol
+-Wno-c++11-extensions -Wno-c++14-extensions -Wno-c++17-extensions @gol
+-Wno-c++20-extensions -Wno-c++23-extensions @gol
-Wcast-align -Wcast-align=strict -Wcast-function-type -Wcast-qual @gol
-Wchar-subscripts @gol
-Wclobbered -Wcomment @gol
@@ -8154,6 +8156,41 @@ and ISO C++ 2017. This warning is enabled by @option{-Wall}.
Warn about C++ constructs whose meaning differs between ISO C++ 2017
and ISO C++ 2020. This warning is enabled by @option{-Wall}.
+@item -Wno-c++11-extensions @r{(C++ and Objective-C++ only)}
+@opindex Wc++11-extensions
+@opindex Wno-c++11-extensions
+Do not warn about C++11 constructs in code being compiled using
+an older C++ standard. Even without this option, some C++11 constructs
+will only be diagnosed if @option{-Wpedantic} is used.
+
+@item -Wno-c++14-extensions @r{(C++ and Objective-C++ only)}
+@opindex Wc++14-extensions
+@opindex Wno-c++14-extensions
+Do not warn about C++14 constructs in code being compiled using
+an older C++ standard. Even without this option, some C++14 constructs
+will only be diagnosed if @option{-Wpedantic} is used.
+
+@item -Wno-c++17-extensions @r{(C++ and Objective-C++ only)}
+@opindex Wc++17-extensions
+@opindex Wno-c++17-extensions
+Do not warn about C++17 constructs in code being compiled using
+an older C++ standard. Even without this option, some C++17 constructs
+will only be diagnosed if @option{-Wpedantic} is used.
+
+@item -Wno-c++20-extensions @r{(C++ and Objective-C++ only)}
+@opindex Wc++20-extensions
+@opindex Wno-c++20-extensions
+Do not warn about C++20 constructs in code being compiled using
+an older C++ standard. Even without this option, some C++20 constructs
+will only be diagnosed if @option{-Wpedantic} is used.
+
+@item -Wno-c++23-extensions @r{(C++ and Objective-C++ only)}
+@opindex Wc++23-extensions
+@opindex Wno-c++23-extensions
+Do not warn about C++23 constructs in code being compiled using
+an older C++ standard. Even without this option, some C++23 constructs
+will only be diagnosed if @option{-Wpedantic} is used.
+
@item -Wcast-qual
@opindex Wcast-qual
@opindex Wno-cast-qual
@@ -14226,6 +14263,11 @@ code to iterate. 2 allows partial vector loads and stores in all loops.
The parameter only has an effect on targets that support partial
vector loads and stores.
+@item vect-inner-loop-cost-factor
+The factor which the loop vectorizer applies to the cost of statements
+in an inner loop relative to the loop being vectorized. The default
+value is 50.
+
@item avoid-fma-max-bits
Maximum number of bits for which we avoid creating FMAs.
@@ -14383,6 +14425,14 @@ With @option{--param=openacc-kernels=parloops}, OpenACC `kernels'
constructs are handled by the @samp{parloops} pass, en bloc.
This is the current default.
+@item openacc-privatization
+Specify mode of OpenACC privatization diagnostics for
+@option{-fopt-info-omp-note} and applicable
+@option{-fdump-tree-*-details}.
+With @option{--param=openacc-privatization=quiet}, don't diagnose.
+This is the current default.
+With @option{--param=openacc-privatization=noisy}, do diagnose.
+
@end table
The following choices of @var{name} are available on AArch64 targets:
diff --git a/gcc/doc/sourcebuild.texi b/gcc/doc/sourcebuild.texi
index ceb6b99..cf309874 100644
--- a/gcc/doc/sourcebuild.texi
+++ b/gcc/doc/sourcebuild.texi
@@ -1217,6 +1217,21 @@ If there is no message for that line or if the text of that message is
not matched by @var{regexp} then the check fails and @var{comment} is
included in the @code{FAIL} message.
+@item @{ dg-note @var{regexp} [@var{comment} [@{ target/xfail @var{selector} @} [@var{line}] ]] @}
+The line is expected to get a @samp{note} message.
+If there is no message for that line or if the text of that message is
+not matched by @var{regexp} then the check fails and @var{comment} is
+included in the @code{FAIL} message.
+
+By default, any @emph{excess} @samp{note} messages are pruned, meaning
+their appearance doesn't trigger @emph{excess errors}.
+However, if @samp{dg-note} is used at least once in a testcase,
+they're not pruned and instead must @emph{all} be handled explicitly.
+Thus, if looking for just single instances of messages with
+@samp{note: } prefixes without caring for all of them, use
+@samp{dg-message "note: [@dots{}]"} instead of @samp{dg-note}, or use
+@samp{dg-note} together with @samp{dg-prune-output "note: "}.
+
@item @{ dg-bogus @var{regexp} [@var{comment} [@{ target/xfail @var{selector} @} [@var{line}] ]] @}
This DejaGnu directive appears on a source line that should not get a
message matching @var{regexp}, or else specifies the source line
@@ -1227,7 +1242,8 @@ targets.
@item @{ dg-line @var{linenumvar} @}
This DejaGnu directive sets the variable @var{linenumvar} to the line number of
the source line. The variable @var{linenumvar} can then be used in subsequent
-@code{dg-error}, @code{dg-warning}, @code{dg-message} and @code{dg-bogus}
+@code{dg-error}, @code{dg-warning}, @code{dg-message}, @code{dg-note}
+and @code{dg-bogus}
directives. For example:
@smallexample
@@ -1239,7 +1255,9 @@ float a; /* @{ dg-error "conflicting types of" @} */
@item @{ dg-excess-errors @var{comment} [@{ target/xfail @var{selector} @}] @}
This DejaGnu directive indicates that the test is expected to fail due
to compiler messages that are not handled by @samp{dg-error},
-@samp{dg-warning} or @samp{dg-bogus}. For this directive @samp{xfail}
+@samp{dg-warning}, @code{dg-message}, @samp{dg-note} or
+@samp{dg-bogus}.
+For this directive @samp{xfail}
has the same effect as @samp{target}.
@item @{ dg-prune-output @var{regexp} @}
@@ -2737,6 +2755,10 @@ constant.
@item lgccjit
Target supports -lgccjit, i.e. libgccjit.so can be linked into jit tests.
+
+@item __OPTIMIZE__
+Optimizations are enabled (@code{__OPTIMIZE__}) per the current
+compiler flags.
@end table
@subsubsection Local to tests in @code{gcc.target/i386}
diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi
index 85ea939..e3a080e 100644
--- a/gcc/doc/tm.texi
+++ b/gcc/doc/tm.texi
@@ -6236,6 +6236,32 @@ like @code{cond_add@var{m}}. The default implementation returns a zero
constant of type @var{type}.
@end deftypefn
+@deftypefn {Target Hook} tree TARGET_GOACC_ADJUST_PRIVATE_DECL (location_t @var{loc}, tree @var{var}, int @var{level})
+This hook, if defined, is used by accelerator target back-ends to adjust
+OpenACC variable declarations that should be made private to the given
+parallelism level (i.e. @code{GOMP_DIM_GANG}, @code{GOMP_DIM_WORKER} or
+@code{GOMP_DIM_VECTOR}). A typical use for this hook is to force variable
+declarations at the @code{gang} level to reside in GPU shared memory.
+@var{loc} may be used for diagnostic purposes.
+
+You may also use the @code{TARGET_GOACC_EXPAND_VAR_DECL} hook if the
+adjusted variable declaration needs to be expanded to RTL in a non-standard
+way.
+@end deftypefn
+
+@deftypefn {Target Hook} rtx TARGET_GOACC_EXPAND_VAR_DECL (tree @var{var})
+This hook, if defined, is used by accelerator target back-ends to expand
+specially handled kinds of @code{VAR_DECL} expressions. A particular use is
+to place variables with specific attributes inside special accelarator
+memories. A return value of @code{NULL} indicates that the target does not
+handle this @code{VAR_DECL}, and normal RTL expanding is resumed.
+
+Only define this hook if your accelerator target needs to expand certain
+@code{VAR_DECL} nodes in a way that differs from the default. You can also adjust
+private variables at OpenACC device-lowering time using the
+@code{TARGET_GOACC_ADJUST_PRIVATE_DECL} target hook.
+@end deftypefn
+
@node Anchored Addresses
@section Anchored Addresses
@cindex anchored addresses
diff --git a/gcc/doc/tm.texi.in b/gcc/doc/tm.texi.in
index d8e3de1..d9fbbe2 100644
--- a/gcc/doc/tm.texi.in
+++ b/gcc/doc/tm.texi.in
@@ -4221,6 +4221,10 @@ address; but often a machine-dependent strategy can generate better code.
@hook TARGET_PREFERRED_ELSE_VALUE
+@hook TARGET_GOACC_ADJUST_PRIVATE_DECL
+
+@hook TARGET_GOACC_EXPAND_VAR_DECL
+
@node Anchored Addresses
@section Anchored Addresses
@cindex anchored addresses