aboutsummaryrefslogtreecommitdiff
path: root/gcc/doc
diff options
context:
space:
mode:
authorTobias Burnus <tobias@codesourcery.com>2023-11-24 15:31:08 +0100
committerTobias Burnus <tobias@codesourcery.com>2023-11-24 15:31:08 +0100
commit449b6b817ed76173e6475debd02b195ea9dab0a0 (patch)
treefb600916fe66e127887ae99bcfb4cc34bd868bd5 /gcc/doc
parent439779bacee869643c93a4710a29f89ad031ee4a (diff)
downloadgcc-449b6b817ed76173e6475debd02b195ea9dab0a0.zip
gcc-449b6b817ed76173e6475debd02b195ea9dab0a0.tar.gz
gcc-449b6b817ed76173e6475debd02b195ea9dab0a0.tar.bz2
OpenMP: Add -Wopenmp and use it
The new warning has two purposes: First, it makes clearer to the user that it is about OpenMP and, secondly and more importantly, it permits to use -Wno-openmp. The newly added -Wopenmp is enabled by default and replaces the '0' (always warning) in several OpenMP-related warning calls. For code shared with OpenACC, it only uses OPT_Wopenmp for 'flag_openmp | flag_openmp_simd'. gcc/c-family/ChangeLog: * c.opt (Wopenmp): Add, enable by default. gcc/c/ChangeLog: * c-parser.cc (c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize, c_parser_omp_clause_priority, c_parser_omp_clause_schedule, c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit, c_parser_omp_clause_dist_schedule, c_parser_omp_depobj, c_parser_omp_scan_loop_body, c_parser_omp_assumption_clauses): Add OPT_Wopenmp to warning_at. gcc/cp/ChangeLog: * parser.cc (cp_parser_omp_clause_dist_schedule, cp_parser_omp_scan_loop_body, cp_parser_omp_assumption_clauses, cp_parser_omp_depobj): Add OPT_Wopenmp to warning_at. * semantics.cc (finish_omp_clauses): Likewise. gcc/ChangeLog: * doc/invoke.texi (-Wopenmp): Add. * gimplify.cc (gimplify_omp_for): Add OPT_Wopenmp to warning_at. * omp-expand.cc (expand_omp_ordered_sink): Likewise. * omp-general.cc (omp_check_context_selector): Likewise. * omp-low.cc (scan_omp_for, check_omp_nesting_restrictions, lower_omp_ordered_clauses): Likewise. * omp-simd-clone.cc (simd_clone_clauses_extract): Likewise. gcc/fortran/ChangeLog: * lang.opt (Wopenmp): Add, enabled by dafault and documented in C. * openmp.cc (gfc_match_omp_declare_target, resolve_positive_int_expr, resolve_nonnegative_int_expr, resolve_omp_clauses, gfc_resolve_omp_do_blocks): Use OPT_Wopenmp with gfc_warning{,_now}.
Diffstat (limited to 'gcc/doc')
-rw-r--r--gcc/doc/invoke.texi7
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 7801f80..23e2b74 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -383,7 +383,7 @@ Objective-C and Objective-C++ Dialects}.
-Wnormalized=@r{[}none@r{|}id@r{|}nfc@r{|}nfkc@r{]}
-Wnull-dereference -Wno-odr
-Wopenacc-parallelism
--Wopenmp-simd
+-Wopenmp -Wopenmp-simd
-Wno-overflow -Woverlength-strings -Wno-override-init-side-effects
-Wpacked -Wno-packed-bitfield-compat -Wpacked-not-aligned -Wpadded
-Wparentheses -Wno-pedantic-ms-format
@@ -9957,6 +9957,11 @@ Enabled by default.
@item -Wopenacc-parallelism
Warn about potentially suboptimal choices related to OpenACC parallelism.
+@opindex Wopenmp
+@opindex Wno-openmp
+@item -Wno-openmp
+Warn about suspicious OpenMP code.
+
@opindex Wopenmp-simd
@opindex Wno-openmp-simd
@item -Wopenmp-simd