public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Martin Sebor <msebor@gmail.com>
To: Jakub Jelinek <jakub@redhat.com>
Cc: Richard Biener <rguenther@suse.de>, Jeff Law <law@redhat.com>,
	gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] Fix pdftex miscompilation due to get_range_strlen (PR tree-optimization/84478)
Date: Tue, 20 Feb 2018 23:59:00 -0000	[thread overview]
Message-ID: <6f9446cc-e61c-7f6b-1270-2b47546726f2@gmail.com> (raw)
In-Reply-To: <20180220204948.GJ5867@tucnak>

> It would help if you explained why you think it is a good idea
> ignoring the other phi arguments if you have one (or more) where you can
> determine length.

It's a heuristic that was meant just for the -Wformat-overflow
warning.  When making decisions that affect code generation it's
obviously not correct to ignore the possibility that unknown
arguments may be shorter than the minimum or longer than
the maximum.  The fuzzy argument was meant to differentiate
between two got but I forgot about it when I added the fix
for PR 83671.

For GCC 8 I don't have a preference for how to fix this as long
as it doesn't regress the warning tests.

I think the ultimate solution (for GCC 9) may be to either
disable the heuristic for code generation purposes (e.g., via
another argument/flag) or provide a pointer argument to indicate
to the caller that the minimum is based on known strings, and that
the real minimum may be zero.

Martin

  reply	other threads:[~2018-02-20 23:59 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-20 17:49 Jakub Jelinek
2018-02-20 19:03 ` Martin Sebor
2018-02-20 20:13   ` Martin Sebor
2018-02-21  0:49     ` [PATCH] Fix pdftex miscompilation due to get_range_strlen (PR tree-optimization/84478, take 2 and 3) Jakub Jelinek
2018-02-20 22:49       ` Martin Sebor
2018-02-21  3:56       ` Jeff Law
2018-02-21  3:56       ` Jeff Law
2018-02-21 14:49         ` Jakub Jelinek
2018-02-21  3:36     ` [PATCH] Fix pdftex miscompilation due to get_range_strlen (PR tree-optimization/84478) Jeff Law
2018-02-20 20:49   ` Jakub Jelinek
2018-02-20 23:59     ` Martin Sebor [this message]
2018-02-21  3:25       ` Jeff Law
2018-02-21 15:49         ` Martin Sebor
2018-02-22  7:39         ` Richard Biener
2018-02-21  7:49       ` Jakub Jelinek
2018-02-21  1:00         ` Martin Sebor
2018-02-21  3:31         ` Jeff Law
2018-02-21  8:49           ` Jakub Jelinek
2018-02-21  3:42   ` Jeff Law

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6f9446cc-e61c-7f6b-1270-2b47546726f2@gmail.com \
    --to=msebor@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jakub@redhat.com \
    --cc=law@redhat.com \
    --cc=rguenther@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).