public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@redhat.com>
To: David Malcolm <dmalcolm@redhat.com>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] c: fix uninitialized c_expr::m_decimal [PR106830]
Date: Thu, 22 Sep 2022 13:22:08 +0200	[thread overview]
Message-ID: <YyxFYER2huO25D1c@tucnak> (raw)
In-Reply-To: <20220907012047.425066-1-dmalcolm@redhat.com>

On Tue, Sep 06, 2022 at 09:20:47PM -0400, David Malcolm via Gcc-patches wrote:
> I added c_expr::m_decimal in r13-2386-gbedfca647a9e9c1a as part of the
> implementation of -Wxor-used-as-pow, but I missed various places where
> the field needed to be initialized.
> 
> Fixed thusly (based on searching for places that assign to
> the original_code field).
> 
> Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu.
> 
> OK for trunk?
> 
> Thanks
> Dave
> 
> 
> gcc/c-family/ChangeLog:
> 	PR c/106830
> 	* c-warn.cc (check_for_xor_used_as_pow): Don't try checking
> 	values that don't fit in uhwi.
> 
> gcc/c/ChangeLog:
> 	PR c/106830
> 	* c-parser.cc (c_parser_initelt): Initialize m_decimal.
> 	(c_parser_cast_expression): Likewise.
> 	(c_parser_alignof_expression): Likewise.
> 	(c_parser_postfix_expression_after_paren_type): Likewise.
> 	(c_parser_postfix_expression_after_primary): Likewise.
> 	(c_parser_expression): Likewise.
> 	(c_parser_omp_variable_list): Likewise.
> 	(c_parser_transaction_expression): Likewise.
> 	* c-tree.h (c_expr::set_error): Likewise.
> 	* c-typeck.cc (c_expr_sizeof_expr): Likewise.
> 	(parser_build_unary_op): Likewise.
> 	(parser_build_binary_op): Likewise.
> 	(digest_init): Likewise.
> 	(pop_init_level): Likewise.
> 	* gimple-parser.cc (c_parser_gimple_call_internal): Likewise.
> 
> gcc/testsuite/ChangeLog:
> 	PR c/106830
> 	* gcc.dg/Wxor-used-as-pow-pr106830.c: New test.

Ok, thanks.

	Jakub


      reply	other threads:[~2022-09-22 11:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-07  1:20 David Malcolm
2022-09-22 11:22 ` Jakub Jelinek [this message]

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=YyxFYER2huO25D1c@tucnak \
    --to=jakub@redhat.com \
    --cc=dmalcolm@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    /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).