This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [fortran, patch] Fix handling of printf-style position specifiers of the form "%3$d" in error.c (PR29711)

Jerry DeLisle wrote:
Tobias Burnus wrote:
Index: gcc/fortran/error.c
--- gcc/fortran/error.c (Revision 119599)
+++ gcc/fortran/error.c (Arbeitskopie)
@@ -549,6 +549,7 @@
          /* This is a position specifier.  See comment above.  */
          while (ISDIGIT(*format))
+           format++;

          /* Skip over the dollar sign.  */

Is there a test case for this condition? Or putting it another way, is there a test case that did not catch the problem that should be fixed?

This particular bit of code, so far as I'm aware, only applies to versions of the compiler with translated error messages (since those are the only ones that use the "%3$d" form in error messages); it doesn't ever get used in the non-translated version.

As such, I can't think of any obvious way to test it within the testsuite. (It might be a useful thing to put on the list of regression tests that someone should run manually every so often, though, along with the very-large-file tests that were mentioned in such a context a month ago.)

- Brooks

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]