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 installed]: warn_summary update for quoting style in warnings


The change in quoting mechanism inside warnings from `%s' to %qs meant
I had to update the sed pattern in warn_summary's keywordFilter()
shell function.  This function summarizes various lines like this:

> 1 string length '844' is greater than the length '509' ISO C89 compilers are required to support
> 1 string length '834' is greater than the length '509' ISO C89 compilers are required to support
> 1 string length '783' is greater than the length '509' ISO C89 compilers are required to support
> 1 string length '695' is greater than the length '509' ISO C89 compilers are required to support
> 1 string length '643' is greater than the length '509' ISO C89 compilers are required to support
> 1 string length '608' is greater than the length '509' ISO C89 compilers are required to support
> 1 string length '597' is greater than the length '509' ISO C89 compilers are required to support
> 1 string length '535' is greater than the length '509' ISO C89 compilers are required to support

into one line like this:

 > 8 string length `???' is greater than the length `???' ISO C89 compilers are required to support

We now accept single quote to start quoted text in addition to
backtick.  I.e. 'blah' as well as `blah'.  I'm not sure what to do if
anything about internationalized quotes should they appear in
warnings.  Perhaps not all sed implemantations can handle them. (?)

Anyway patch applied to mainline, and 4.0 since the patch is safe,
well tested, and we have the problem on that branch also.  (Previous
gcc versions are not affected.)

		--Kaveh


2005-03-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>

	* warn_summary (keywordFilter): Update sed pattern for new quoting
	style in warnings.

Index: warn_summary
===================================================================
RCS file: /cvs/gcc/gcc/contrib/warn_summary,v
retrieving revision 1.9
diff -u -p -r1.9 warn_summary
--- warn_summary	7 Mar 2005 14:59:17 -0000	1.9
+++ warn_summary	8 Mar 2005 13:41:28 -0000
@@ -107,7 +107,7 @@ keywordFilter() {
 	s/`\(const\)'"'"'/"\1"/g;
 	s/`\(noreturn\)'"'"'/"\1"/g;
 	s/`\(longjmp\)'"'"' or `\(vfork\)'"'"'/"\1" or "\2"/g;
-	s/`'"[^']*'/"'`???'"'/g;"'
+	s/'"[\`'][^']*'/"'"???"/g;
 	s/.*format, .* arg (arg [0-9][0-9]*)/??? format, ??? arg (arg ???)/;
 	s/\([( ]\)arg [0-9][0-9]*\([) ]\)/\1arg ???\2/;
 	s/"\([^"]*\)"/`\1'"'"'/g'


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