[PATCH] openmp: Improve Fortran Diagnostics for Linear Clause
Tobias Burnus
tburnus@baylibre.com
Thu Dec 18 19:11:56 GMT 2025
Gio T wrote:
> Improves the diagnostics for the deprecated form of the linear
> clause, now providing a hint for the contemporary syntax.
> Additionally modifies the relevant test to reflect the verbiage
> change.
[For C/C++, fixit hints were added by Jakub. Thanks!]
> Subject: [PATCH] [PATCH] openmp: Improve Fortran Diagnostics for Linear Clause
For the commit, better omit the '[PATCH]' – both as it looks ugly and as
'format-patch' adds it (and 'git am <...' ignores it.)
> This patch improves diagnostics for the linear clause,
> providing a more accurate and intuitive recommendation
> for remediation if the deprecated syntax is used.
[Namely, showing the 5.2+ syntax as programming aid.]
> --- a/gcc/fortran/openmp.cc
> +++ b/gcc/fortran/openmp.cc
...
> + gfc_warning (OPT_Wdeprecated_openmp,
> + "Specification of the list items as "
> + "arguments to the modifiers at %L is "
> + "deprecated; since OpenMP 5.2, use "
> + "'linear(%s : %s%s)'", &saved_loc,
'linear(…)' should be %<linear(…)%> to use the nicer quotation marks +
color/bold highlighting.
Otherwise, LGTM.
Tobias
More information about the Fortran
mailing list