This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: [PATCH] Fix BZ17292 parse error of string auto-concatenation in printf statement
- From: David Smith <dsmith at redhat dot com>
- To: Hushan Jia <hushan at smartx dot com>, systemtap at sourceware dot org
- Cc: fche at redhat dot com
- Date: Fri, 19 Dec 2014 08:43:27 -0600
- Subject: Re: [PATCH] Fix BZ17292 parse error of string auto-concatenation in printf statement
- Authentication-results: sourceware.org; auth=none
- References: <20141219094602 dot GD12715 at hushan dot zelin dot io>
On 12/19/2014 03:46 AM, Hushan Jia wrote:
> Fix BZ17292 parse error of string auto-concatenation in printf statement
>
> Use multi part string concatenation as the format string of printf
> statement will cuase following parse error:
>
> $ /usr/bin/stap -p1 testsuite/parseok/strconcat.stp
> parse error: expected ','
> saw: string 'bar' at testsuite/parseok/strconcat.stp:6:19
> source: printf("foo " "bar" "\n")
> ^
>
> 1 parse error.
> Pass 1: parse failed. [man error::pass1]
>
> This fix is suggested by fche.
>
> Signed-off-by: Hushan Jia <hushan@smartx.com>
Wow! Thanks, this is awesome - you even included a test case.
I'll test this today and check it in.
(I've had a thought - I wonder if this sort of thing needs fixing other
places...)
--
David Smith
dsmith@redhat.com
Red Hat
http://www.redhat.com
256.217.0141 (direct)
256.837.0057 (fax)