Ian Lance Taylor - Re: [PATCH] Fix ICE on sprintf (p, "%s") and miscompilation of sprintf ( (original) (raw)
This is the mail archive of the gcc-patches@gcc.gnu.orgmailing 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: [PATCH] Fix ICE on sprintf (p, "%s") and miscompilation of sprintf (p, "a", q++) (PR middle-end/30473)
- From: Ian Lance Taylor
- To: Jakub Jelinek
- Cc: gcc-patches at gcc dot gnu dot org
- Date: 01 Feb 2007 14:44:56 -0800
- Subject: Re: [PATCH] Fix ICE on sprintf (p, "%s") and miscompilation of sprintf (p, "a", q++) (PR middle-end/30473)
- References: <20070201133323.GG27294@devserv.devel.redhat.com> <m3hcu5qzuh.fsf@localhost.localdomain> <20070201223630.GJ27294@devserv.devel.redhat.com>
Jakub Jelinek jakub@redhat.com writes:
On Thu, Feb 01, 2007 at 02:26:14PM -0800, Ian Lance Taylor wrote:
- arglist = TREE_CHAIN (TREE_CHAIN (arglist));
Please use a new variable here, e.g., third_argument, rather than reusing arglist. New variables are fairly cheap, and I think it will make the rest of the patch more comprehensible.
I tried to follow all other {fold,expand}builtinprintf routines which also advance arglist (the big difference is that they usually don't call verify_arglist but validate it by hand). third_argument would be a wrong name, as 3rd argument really is TREE_VALUE (TREE_CHAIN (TREE_CHAIN (arglist))), but guess this can be called args or something similar.
Oh, OK, if the other functions do it that way, you can do it that way too. I think it's a little bit confusing, but it would be more confusing for different functions to do it differently.
Thanks.
Ian
- References:
- [PATCH] Fix ICE on sprintf (p, "%s") and miscompilation of sprintf (p, "a", q++) (PR middle-end/30473)
* From: Jakub Jelinek - Re: [PATCH] Fix ICE on sprintf (p, "%s") and miscompilation of sprintf (p, "a", q++) (PR middle-end/30473)
* From: Ian Lance Taylor - Re: [PATCH] Fix ICE on sprintf (p, "%s") and miscompilation of sprintf (p, "a", q++) (PR middle-end/30473)
* From: Jakub Jelinek
- [PATCH] Fix ICE on sprintf (p, "%s") and miscompilation of sprintf (p, "a", q++) (PR middle-end/30473)
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |