On 8/27/19 3:09 AM, Christophe Lyon wrote:
On Fri, 23 Aug 2019 at 04:14, Jeff Law wrote:
On 8/12/19 4:09 PM, Martin Sebor wrote:
gcc-83431.diff
PR tree-optimization/83431 - -Wformat-truncation may incorrectly report
truncation
gcc/ChangeLog:
PR c++/83431
* gimple-ssa-sprin
On Fri, 23 Aug 2019 at 04:14, Jeff Law wrote:
>
> On 8/12/19 4:09 PM, Martin Sebor wrote:
>
> >
> > gcc-83431.diff
> >
> > PR tree-optimization/83431 - -Wformat-truncation may incorrectly report
> > truncation
> >
> > gcc/ChangeLog:
> >
> > PR c++/83431
> > * gimple-ssa-sprintf.c (pas
On 8/12/19 4:09 PM, Martin Sebor wrote:
>
> gcc-83431.diff
>
> PR tree-optimization/83431 - -Wformat-truncation may incorrectly report
> truncation
>
> gcc/ChangeLog:
>
> PR c++/83431
> * gimple-ssa-sprintf.c (pass_data_sprintf_length): Remove object.
> (sprintf_dom_walker):
On 7/10/19 5:54 PM, Martin Sebor wrote:
>> So if I'm reading things correctly, it appears gimple-ssa-sprintf.c is
>> no longer a distinct pass. Instead it co-exists with the strlen pass.
>> Right?
>
> Yes. strlen just calls into sprintf to handle the calls.
OK. Just wanted to make sure I unders
On 7/1/19 7:47 PM, Martin Sebor wrote:
>
> Jeff, I looked into your question/suggestion for me last week
> when we spoke, to introduce some sort of a recursion limit for
> get_range_strlen_dynamic. It's easily doable but before we go
> down that path I did some testing to see how bad it can get a
...
We've already touched on the need to limit the backwards walk out of
this code. Limiting based on the product of # phi args * number of phis
visited, recursion depth, or number of SSA_NAME_DEF_STMTs visited all
seem reasonable to me.
I do think Richi's suggestion for figuring out a suitable
On Thu, Jul 11, 2019 at 11:11:58AM +0200, Richard Biener wrote:
> The others all smell like they might be yours ;) (besides object-size
> maybe but that one is limited by having a cache - hopefully also
> used when not used in the compute-everything mode).
objsz doesn't really have a compute ever
On Thu, Jul 11, 2019 at 1:54 AM Martin Sebor wrote:
>
> On 7/2/19 4:38 PM, Jeff Law wrote:
> > On 7/1/19 7:47 PM, Martin Sebor wrote:
> >> Attached is a more complete solution that fully resolves the bug
> >> report by avoiding a warning in cases like:
> >>
> >>char a[32], b[8];
> >>
> >>v
On 7/2/19 4:38 PM, Jeff Law wrote:
On 7/1/19 7:47 PM, Martin Sebor wrote:
Attached is a more complete solution that fully resolves the bug
report by avoiding a warning in cases like:
char a[32], b[8];
void f (void)
{
if (strlen (a) < sizeof b - 2)
snprintf (b, sizeof b, "b
On 7/2/19 3:59 AM, Richard Biener wrote:
On Tue, Jul 2, 2019 at 3:48 AM Martin Sebor wrote:
Attached is a more complete solution that fully resolves the bug
report by avoiding a warning in cases like:
char a[32], b[8];
void f (void)
{
if (strlen (a) < sizeof b - 2)
On 7/1/19 7:47 PM, Martin Sebor wrote:
> Attached is a more complete solution that fully resolves the bug
> report by avoiding a warning in cases like:
>
> char a[32], b[8];
>
> void f (void)
> {
> if (strlen (a) < sizeof b - 2)
> snprintf (b, sizeof b, "b=%s", a); // no -Wformat-
On 7/2/19 3:59 AM, Richard Biener wrote:
> On Tue, Jul 2, 2019 at 3:48 AM Martin Sebor wrote:
>>
>> Attached is a more complete solution that fully resolves the bug
>> report by avoiding a warning in cases like:
>>
>>char a[32], b[8];
>>
>>void f (void)
>>{
>> if (strlen (a) < siz
On Tue, Jul 2, 2019 at 3:48 AM Martin Sebor wrote:
>
> Attached is a more complete solution that fully resolves the bug
> report by avoiding a warning in cases like:
>
>char a[32], b[8];
>
>void f (void)
>{
> if (strlen (a) < sizeof b - 2)
>snprintf (b, sizeof b, "b=%s", a
Attached is a more complete solution that fully resolves the bug
report by avoiding a warning in cases like:
char a[32], b[8];
void f (void)
{
if (strlen (a) < sizeof b - 2)
snprintf (b, sizeof b, "b=%s", a); // no -Wformat-truncation
}
It does that by having get_range_strlen_
The sprintf and strlen passes both work with strings but
run independently of one another and don't share state. As
a result, lengths of strings dynamically created by functions
that are available to the strlen pass are not available to
sprintf. Conversely, lengths of strings formatted by
the sp
15 matches
Mail list logo