On 07/17/2012 11:42 AM, Janus Weil wrote:
here is a patch which makes 'gfc_notify_std' print the relevant
version of the Fortran standard automatically when issuing
errors/warnings. Up to now this had to be done manually and was
forgotten (or inconsistent)

I think the patch is a good idea. Some comments from glancing at the patch.

-    error_print (_("Error:"), _(gmsgid), argp);
+    strcpy (buffer, "Error:");

This seems to break internationalization.

+    case GFC_STD_F2008_TS:
+      strcat (buffer, " TS 29113:");
+      break;

That's currently correct. However, there is another post-Fortran 2008 Technical Specification in preparation. (Coarray extensions.)* How should be handled? "TS 29113 or TS 12345:"?

+    case GFC_STD_LEGACY:
+      strcat (buffer, " Extension:");

I'd prefer something like "Legacy extension:" (Or "Legacy:"). "Extension" makes it very hard to find the flag in the compiler to enable this feature (-std=legacy). Recall that the default -std=gnu doesn't include legacy.

+      strcat (buffer, " Fortran 2008 obsolescent feature:");


I'd rather have something like "Obsolescent since Fortran 2008:". Especially when using -std=f2015,* the wording seems to be not ideal.

Additionally, your patch won't work with internationalization. For "Fortran 2008" that's probably okay, but for this one, I think it should be translatable.

Tobias

* Coarrays and Fortran 2015: See schedule at ftp://ftp.nag.co.uk/sc22wg5/N1901-N1950/N1925.txt Requirements document for the Coarray TS: ftp://ftp.nag.co.uk/sc22wg5/N1901-N1950/N1930.txt

Reply via email to