On 10/14/23 13:43, Tobias Burnus wrote:
When browsing libgomp doc, I came across
https://gcc.gnu.org/onlinedocs/libgomp/Enabling-OpenMP.html>> First, I found especially the Fortran part difficult to read. Secondly,
it missed the C++ attribute syntax. And I also missed a reference to
-fopenmp-simd.

The attached patch tries to improve this. Note that it talks about C and
C++ attributes, even though C23's [[omp::]] support has not yet landed.
(But is expected very soon.)

Is somebody actively working on implementing that, and expecting to get it in before Stage 1 closes? I don't think we should document features that don't exist yet. This syntax for C also isn't even in the draft OpenMP 6.0 document so at this point it's just a hypothetical extension. To me it seems a better use of resources to finish implementing things that are actually in earlier versions of the OpenMP standard, and to fill in documentation for features that are actually implemented.

Other than that...

diff --git a/libgomp/libgomp.texi b/libgomp/libgomp.texi
index 526d1be2955..d8126f96fe4 100644
--- a/libgomp/libgomp.texi
+++ b/libgomp/libgomp.texi
@@ -136,15 +136,22 @@ changed to GNU Offloading and Multi Processing Runtime 
Library.
 @node Enabling OpenMP
 @chapter Enabling OpenMP
-To activate the OpenMP extensions for C/C++ and Fortran, the compile-time -flag @command{-fopenmp} must be specified. This enables the OpenMP directive -@code{#pragma omp} in C/C++ and @code{!$omp} directives in free form, -@code{c$omp}, @code{*$omp} and @code{!$omp} directives in fixed form, -@code{!$} conditional compilation sentinels in free form and @code{c$},
-@code{*$} and @code{!$} sentinels in fixed form, for Fortran.  The flag also
-arranges for automatic linking of the OpenMP runtime library +To activate the OpenMP extensions for C/C++ and Fortran, the compile-time
+flag @command{-fopenmp} must be specified.  For C and C++, this enables

Use @option markup on options, not @command.

+the handling of the OpenMP directives using @code{#pragma omp} and the
+@code{[[omp::directive(...)]]}, @code{[[omp::sequence(...)]]} and
+@code{[[omp::decl(...)]]} attributes.  For Fortran, it enables for
+free source form the @code{!$omp} sentinel for directives and the
+@code{!$} conditional compilation sentinel and for fixed source form the
+@code{c$omp}, @code{*$omp} and @code{!$omp} sentinels for directives and
+the @code{c$}, @code{*$} and @code{!$} conditional compilation sentinels.
+The flag also arranges for automatic linking of the OpenMP runtime library
 (@ref{Runtime Library Routines}).

And I think all those @code markups should be @samp instead, or you could just replace this whole blurb with something like "This flag enables recognition of the directive syntax documented in the OpenMP specification, and also arranges for automatic linking..."

+The @command{-fopenmp-simd} flag can be used to enable a subset of

This should be @option too.

+OpenMP directives, which do not require the linking of neither the

s/, which/ that/
s/neither/either/

+OpenMP runtime library nor the POSIX threads library.
+
 A complete description of all OpenMP directives may be found in the
 @uref{https://www.openmp.org, OpenMP Application Program Interface} manuals.
 See also @ref{OpenMP Implementation Status}.

-Sandra

Reply via email to