[Patch] OpenMP: Document ompx warnings + add Fortran omx warning [PR106670]

Tobias Burnus tobias@codesourcery.com
Mon Aug 29 09:24:52 GMT 2022


(Patch + RFC.)

OpenMP 5.2 has 'ompx' and (for fixed source form Fortran) 'omx'
as sentinel to provide a defined namespace for vendor extensions.

The behavior when encountering an unknown directive with ompx/omp sentinel
(or an unknown clause with ompx_ prefix) is implementation defined. For unknown
clauses there will be always an error in GCC.
For sentinels, GCC compiles the code and ignores the directive.
>From the user perspective, either silently ignoring the directive or
showing a warning or showing an erroring is best - depending on the semantic
of that vendor extension. As the semantic is not known, providing a means
to warn makes most sense.

For warning, we can either show a
- specific message for ompx/omx - or a
- generic message
And we can either use some existing generic flag (unknown pragmas,
attributes, suprising behavior etc.), depending on language and source
language (C, C++, Fortran fixed/free)- or add & use a specific -W flag.

The attached patch just documents the existing warning behavior, which
is quite diverse + adds testcases for them. As fixed-form Fortran had no
warning, a new warning with a specific message was added.
(Cf. testcases in the patch for what's shown as message.)

OK for mainline - or other ideas how to handle this topic best?

Tobias


-----------------
Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht München, HRB 106955
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ompx.diff
Type: text/x-patch
Size: 6329 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20220829/638cf1c8/attachment.bin>


More information about the Gcc-patches mailing list