This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Improve other 13 define_insns
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Kirill Yukhin <kirill dot yukhin at gmail dot com>
- Cc: Uros Bizjak <ubizjak at gmail dot com>, gcc-patches at gcc dot gnu dot org
- Date: Fri, 13 May 2016 13:51:41 +0200
- Subject: Re: [PATCH] Improve other 13 define_insns
- Authentication-results: sourceware.org; auth=none
- References: <20160504194302 dot GO26501 at tucnak dot zalov dot cz> <20160512141959 dot GC28945 at msticlxl57 dot ims dot intel dot com> <20160512184208 dot GF28550 at tucnak dot redhat dot com> <20160513114634 dot GA5904 at msticlxl57 dot ims dot intel dot com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Fri, May 13, 2016 at 02:46:36PM +0300, Kirill Yukhin wrote:
> NP. Below is the patch which fixes both issues.
> It also revealed, that for "*and" pattern 32 byte long
> internal buffer is not enough.
> I've extended bunch of such buffers to 128 bytes.
>
> Probably we might want to re-factor all static char arrays w/
> std::string or at least check how many bytes snprintf actually prints
> and ICE if overflow.
I'd prefer not to use std::string for that, but snprintf and asserts
on the result look reasonable thing to do (though, the snprintf shouldn't
be inside of the assert) obviously.
Jakub