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]

Re: Build broken (was: [PATCH 02/11] Generate pass-instances.def)


On Wed, 2013-07-31 10:34:10 +0200, Jan-Benedict Glaw <jbglaw@lug-owl.de> wrote:
> On Tue, 2013-07-30 20:50:27 -0400, David Malcolm <dmalcolm@redhat.com> wrote:
> [...]
> > Committed to trunk as r201359, having double-checked that it
> > bootstrapped by itself on top of what had gone before, and that the
> > testsuite results were unaffected by it (on x86_64-unknown-linux-gnu).
> 
> [...]
> mawk -f ../../../../gcc/gcc/gen-pass-instances.awk \
>           ../../../../gcc/gcc/passes.def > pass-instances.def
[...]

> It seems this does only happen on one of the three running build
> clients. That one is using `mawk' instead of `gawk', what the two
> other builders (which are not affected) use.

The substr() was wrong, awk starts all its indices with 1, while the
script used 0. gawk ignores this, mawk starts the substring at 1, but
counts from 0 upwards.

Fixed as trivial:

2013-07-31  Jan-Benedict Glaw  <jbglaw@owl.de>

	* gen-pass-instances.awk: Fix offset of substr().


Index: gcc/gen-pass-instances.awk
===================================================================
--- gcc/gen-pass-instances.awk	(revision 201363)
+++ gcc/gen-pass-instances.awk	(working copy)
@@ -55,7 +55,7 @@
 		else
 			pass_counts[pass_name] = 1;
 		printf "%s, %s%s\n",
-			substr(line, 0, pass_starts_at + len_of_pass_name - 1),
+			substr(line, 1, pass_starts_at + len_of_pass_name - 1),
 			pass_counts[pass_name],
 			substr(line, pass_starts_at + len_of_pass_name);
 	} else {


MfG, JBG

-- 
      Jan-Benedict Glaw      jbglaw@lug-owl.de              +49-172-7608481
Signature of:                http://catb.org/~esr/faqs/smart-questions.html
the second  :

Attachment: signature.asc
Description: Digital signature


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