On 06/13/2018 09:16 AM, Jakub Jelinek wrote:
On Wed, Jun 13, 2018 at 08:53:20AM -0600, Martin Sebor wrote:
I'm actually worried about the fold-const.c change and don't understand, why
it has been done at all in the context of this PR.
case SAVE_EXPR:
if (flags & OEP_LEXICOGRAP
On Wed, Jun 13, 2018 at 08:53:20AM -0600, Martin Sebor wrote:
> > I'm actually worried about the fold-const.c change and don't understand, why
> > it has been done at all in the context of this PR.
> >
> > case SAVE_EXPR:
> > if (flags & OEP_LEXICOGRAPHIC)
> > return
On 06/13/2018 01:58 AM, Jakub Jelinek wrote:
On Wed, Jun 13, 2018 at 09:46:28AM +0200, Richard Biener wrote:
gcc/ChangeLog:
PR c/85931
* fold-const.c (operand_equal_p): Handle SAVE_EXPR.
gcc/testsuite/ChangeLog:
PR c/85931
* gcc.dg/Wstringop-truncation-3.c: New
On Wed, Jun 13, 2018 at 10:51:41AM +0200, Richard Biener wrote:
> Your concern is for compile-time, not for correctness, right?
Yes.
> I think that
>
> /* If ARG0 and ARG1 are the same SAVE_EXPR, they are necessarily equal.
> We don't care about side effects in that case because the SAVE_
On Wed, 13 Jun 2018, Jakub Jelinek wrote:
> On Wed, Jun 13, 2018 at 10:22:29AM +0200, Jakub Jelinek wrote:
> > Random testcase for -Wduplicated-branches -fsanitize=shift:
> > int
> > foo (int x, int y)
> > {
> > if (x)
> > y = y << 1 >> 1 << 1 >> 1 << 1 >> 1 << 1 >> 1 << 1 >> 1 << 1 >> 1 <<
On Wed, Jun 13, 2018 at 10:22:29AM +0200, Jakub Jelinek wrote:
> Random testcase for -Wduplicated-branches -fsanitize=shift:
> int
> foo (int x, int y)
> {
> if (x)
> y = y << 1 >> 1 << 1 >> 1 << 1 >> 1 << 1 >> 1 << 1 >> 1 << 1 >> 1 << 1 >>
> 1 << 1 >> 1
> << 1 >> 1 << 1 >> 1 << 1
On Wed, Jun 13, 2018 at 09:58:49AM +0200, Jakub Jelinek wrote:
> I'm actually worried about the fold-const.c change and don't understand, why
> it has been done at all in the context of this PR.
>
> case SAVE_EXPR:
> if (flags & OEP_LEXICOGRAPHIC)
> return OP_SAME (0)
On Wed, Jun 13, 2018 at 09:46:28AM +0200, Richard Biener wrote:
> > > > gcc/ChangeLog:
> > > >
> > > > PR c/85931
> > > > * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
> > > >
> > > > gcc/testsuite/ChangeLog:
> > > >
> > > > PR c/85931
> > > > * gcc.dg/Wstri
On Tue, 12 Jun 2018, Martin Sebor wrote:
> On 06/11/2018 03:57 PM, Jeff Law wrote:
> > On 05/29/2018 08:57 PM, Martin Sebor wrote:
> > > Warning for a strncpy call whose bound is the same as the size
> > > of the source and suggesting to use the size of the source is
> > > less than helpful when b
On 06/11/2018 03:57 PM, Jeff Law wrote:
On 05/29/2018 08:57 PM, Martin Sebor wrote:
Warning for a strncpy call whose bound is the same as the size
of the source and suggesting to use the size of the source is
less than helpful when both sizes are the same, as in:
char a[4], b[4];
strncpy (a
On 05/29/2018 08:57 PM, Martin Sebor wrote:
> Warning for a strncpy call whose bound is the same as the size
> of the source and suggesting to use the size of the source is
> less than helpful when both sizes are the same, as in:
>
> char a[4], b[4];
> strncpy (a, b, sizeof b);
>
> The attach
Ping: https://gcc.gnu.org/ml/gcc-patches/2018-05/msg01698.html
On 06/04/2018 05:50 PM, Martin Sebor wrote:
Ping: https://gcc.gnu.org/ml/gcc-patches/2018-05/msg01698.html
On 05/29/2018 08:57 PM, Martin Sebor wrote:
Warning for a strncpy call whose bound is the same as the size
of the source and
Ping: https://gcc.gnu.org/ml/gcc-patches/2018-05/msg01698.html
On 05/29/2018 08:57 PM, Martin Sebor wrote:
Warning for a strncpy call whose bound is the same as the size
of the source and suggesting to use the size of the source is
less than helpful when both sizes are the same, as in:
char a
Warning for a strncpy call whose bound is the same as the size
of the source and suggesting to use the size of the source is
less than helpful when both sizes are the same, as in:
char a[4], b[4];
strncpy (a, b, sizeof b);
The attached patch suppresses the -Wsizeof-pointer-memaccess
warning
14 matches
Mail list logo