This is the mail archive of the gcc-patches@gcc.gnu.org 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]

[Patch] Clarify comment in diagnostic.c


I was tripped at least twice by a translated string that had invalid 
formats or had them in the wrong order. If that happens, we end up in a 
place with a comment that is really not very helpful, since it suggests a 
cause that has nothing to do with it. The following patch adds a sentence 
to that effect.

If someone approves it, I can commit this.

W.


2003-05-01 Wolfgang Bangerth  <bangerth@dealii.org>

	* diagnostic.c (output_format) Mention another cause for an abort
	in the preceding comment.



Index: diagnostic.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/diagnostic.c,v
retrieving revision 1.106
diff -c -r1.106 diagnostic.c
*** diagnostic.c        1 May 2003 16:13:28 -0000       1.106
--- diagnostic.c        2 May 2003 01:31:02 -0000
***************
*** 607,613 ****
                || !(*buffer->format_decoder) (buffer, text))
            {
              /* Hmmm.  The front-end failed to install a format translator
!                  but called us with an unrecognized format.  Sorry.  */
              abort ();
            }
        }
--- 607,615 ----
                || !(*buffer->format_decoder) (buffer, text))
            {
              /* Hmmm.  The front-end failed to install a format translator
!                  but called us with an unrecognized format.  Or, maybe, the
!                  translated string just contains an invalid format, or
!                  has formats in the wrong order.  Sorry.  */
              abort ();
            }
        }


-------------------------------------------------------------------------
Wolfgang Bangerth              email:            bangerth@ices.utexas.edu
                               www: http://www.ices.utexas.edu/~bangerth/



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