public inbox for fortran@gcc.gnu.org
 help / color / mirror / Atom feed
From: FX Coudert <fxcoudert@gmail.com>
To: Harald Anlauf <anlauf@gmx.de>
Cc: fortran <fortran@gcc.gnu.org>, gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] Fortran: fix argument checking of intrinsics C_SIZEOF, C_F_POINTER [PR106500]
Date: Tue, 9 Apr 2024 09:32:11 +0200	[thread overview]
Message-ID: <1BADB9B4-62BF-43FE-845F-545128503616@gmail.com> (raw)
In-Reply-To: <trinity-46bee991-c93f-4376-a29f-058eee6f6fb1-1712606260574@3c-app-gmx-bs14>

Hi Harald,

Thanks for the patch.


> +  if (attr.function)
> +    {
> +      gfc_error ("FPTR at %L to C_F_POINTER is a function returning a pointer",
> + &fptr->where);
> +      return false;
> +    }
> +
>    if (fptr->rank > 0 && !is_c_interoperable (fptr, &msg, false, true))
>      return gfc_notify_std (GFC_STD_F2018, "Noninteroperable array FPTR "
>     "at %L to C_F_POINTER: %s", &fptr->where, msg);


In both of these gfc_error(), could we change our error message to say "FPTR argument” instead of “FPTR”? “FPTR to C_F_POINTER” does not really make sense to me.

This would be more in line with what the generally do:

> Error: 'x' argument of 'sqrt' intrinsic at (1) must be REAL or COMPLEX

So maybe “FPTR argument to C_F_POINTER at %L” ? That’s much more readable to me.

Otherwise, OK.

FX

  reply	other threads:[~2024-04-09  7:32 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-08 19:57 Harald Anlauf
2024-04-09  7:32 ` FX Coudert [this message]
2024-04-09 21:23   ` [PATCH, v2] " Harald Anlauf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1BADB9B4-62BF-43FE-845F-545128503616@gmail.com \
    --to=fxcoudert@gmail.com \
    --cc=anlauf@gmx.de \
    --cc=fortran@gcc.gnu.org \
    --cc=gcc-patches@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).