public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/74765] missing uninitialized warning (parenthesis, TREE_NO_WARNING abuse)
       [not found] <bug-74765-4@http.gcc.gnu.org/bugzilla/>
@ 2021-04-29 23:47 ` msebor at gcc dot gnu.org
  2021-05-24 22:17 ` msebor at gcc dot gnu.org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 7+ messages in thread
From: msebor at gcc dot gnu.org @ 2021-04-29 23:47 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=74765

Martin Sebor <msebor at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|2019-02-03 00:00:00         |2021-4-29
             Status|NEW                         |ASSIGNED
      Known to fail|7.3.0, 8.2.0, 9.0           |10.3.0, 11.0, 7.5.0, 8.4.0,
                   |                            |9.3.0
           Assignee|unassigned at gcc dot gnu.org      |msebor at gcc dot gnu.org

--- Comment #6 from Martin Sebor <msebor at gcc dot gnu.org> ---
Reconfirming.  I'm working on a fix.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug c++/74765] missing uninitialized warning (parenthesis, TREE_NO_WARNING abuse)
       [not found] <bug-74765-4@http.gcc.gnu.org/bugzilla/>
  2021-04-29 23:47 ` [Bug c++/74765] missing uninitialized warning (parenthesis, TREE_NO_WARNING abuse) msebor at gcc dot gnu.org
@ 2021-05-24 22:17 ` msebor at gcc dot gnu.org
  2021-06-28 21:20 ` cvs-commit at gcc dot gnu.org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 7+ messages in thread
From: msebor at gcc dot gnu.org @ 2021-05-24 22:17 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=74765

Martin Sebor <msebor at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |patch

--- Comment #7 from Martin Sebor <msebor at gcc dot gnu.org> ---
Patch: https://gcc.gnu.org/pipermail/gcc-patches/2021-May/571120.html

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug c++/74765] missing uninitialized warning (parenthesis, TREE_NO_WARNING abuse)
       [not found] <bug-74765-4@http.gcc.gnu.org/bugzilla/>
  2021-04-29 23:47 ` [Bug c++/74765] missing uninitialized warning (parenthesis, TREE_NO_WARNING abuse) msebor at gcc dot gnu.org
  2021-05-24 22:17 ` msebor at gcc dot gnu.org
@ 2021-06-28 21:20 ` cvs-commit at gcc dot gnu.org
  2021-06-28 21:25 ` msebor at gcc dot gnu.org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-06-28 21:20 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=74765

--- Comment #8 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Martin Sebor <msebor@gcc.gnu.org>:

https://gcc.gnu.org/g:40c64c9ea565230817f08b5e66a30a1c94ec880c

commit r12-1861-g40c64c9ea565230817f08b5e66a30a1c94ec880c
Author: Martin Sebor <msebor@redhat.com>
Date:   Mon Jun 28 15:14:50 2021 -0600

    Regression tests for TREE_NO_WARNING enhancement to warning groups
[PR74765, PR74762].

    PR middle-end/74765 - missing uninitialized warning (parenthesis,
TREE_NO_WARNING abuse)
    PR middle-end/74762 - [9/10/11/12 Regression] missing uninitialized warning
(C++, parenthesized expr, TREE_NO_WARNING)

    gcc/testsuite/ChangeLog:

            * g++.dg/uninit-pr74762.C: New test.
            * g++.dg/warn/uninit-pr74765.C: Same.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug c++/74765] missing uninitialized warning (parenthesis, TREE_NO_WARNING abuse)
       [not found] <bug-74765-4@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2021-06-28 21:20 ` cvs-commit at gcc dot gnu.org
@ 2021-06-28 21:25 ` msebor at gcc dot gnu.org
  2022-06-09 23:24 ` ebotcazou at gcc dot gnu.org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 7+ messages in thread
From: msebor at gcc dot gnu.org @ 2021-06-28 21:25 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=74765

Martin Sebor <msebor at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
   Target Milestone|---                         |12.0
      Known to fail|11.0                        |11.1.0
             Status|ASSIGNED                    |RESOLVED

--- Comment #9 from Martin Sebor <msebor at gcc dot gnu.org> ---
Fixed in GCC 12.0.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug c++/74765] missing uninitialized warning (parenthesis, TREE_NO_WARNING abuse)
       [not found] <bug-74765-4@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2021-06-28 21:25 ` msebor at gcc dot gnu.org
@ 2022-06-09 23:24 ` ebotcazou at gcc dot gnu.org
  2022-06-10  9:03 ` jakub at gcc dot gnu.org
  2022-06-10  9:44 ` ebotcazou at gcc dot gnu.org
  6 siblings, 0 replies; 7+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2022-06-09 23:24 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=74765

Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ebotcazou at gcc dot gnu.org

--- Comment #10 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
I don't understand the new code in gimple_set_location:

static inline void
gimple_set_location (gimple *g, location_t location)
{
  /* Copy the no-warning data to the statement location.  */
  copy_warning (location, g->location);
  g->location = location;
}

Typically g->location is UNKNOWN_LOCATION since the GIMPLE statement was just
built so this does:

  copy_warning (location, UNKNOWN_LOCATION);

and finally invokes nowarn_map->remove (location)?

I can fix my particular problem by adding the obvious guard:

static inline void
gimple_set_location (gimple *g, location_t location)
{
  /* Copy the no-warning data to the statement location.  */
  if (g->location != UNKNOWN_LOCATION)
    copy_warning (location, g->location);
  g->location = location;
}

but shouldn't the code query warning-control.cc instead to see if the
no-warning bit is set on g?

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug c++/74765] missing uninitialized warning (parenthesis, TREE_NO_WARNING abuse)
       [not found] <bug-74765-4@http.gcc.gnu.org/bugzilla/>
                   ` (4 preceding siblings ...)
  2022-06-09 23:24 ` ebotcazou at gcc dot gnu.org
@ 2022-06-10  9:03 ` jakub at gcc dot gnu.org
  2022-06-10  9:44 ` ebotcazou at gcc dot gnu.org
  6 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-06-10  9:03 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=74765

--- Comment #11 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Some comments on the topic are in PR104702

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug c++/74765] missing uninitialized warning (parenthesis, TREE_NO_WARNING abuse)
       [not found] <bug-74765-4@http.gcc.gnu.org/bugzilla/>
                   ` (5 preceding siblings ...)
  2022-06-10  9:03 ` jakub at gcc dot gnu.org
@ 2022-06-10  9:44 ` ebotcazou at gcc dot gnu.org
  6 siblings, 0 replies; 7+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2022-06-10  9:44 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=74765

--- Comment #12 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
> Some comments on the topic are in PR104702

Indeed, thanks for the pointer.  I'll probably submit my fixlet though because
the current behavior of gimple_set_location is clearly broken.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-06-10  9:44 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-74765-4@http.gcc.gnu.org/bugzilla/>
2021-04-29 23:47 ` [Bug c++/74765] missing uninitialized warning (parenthesis, TREE_NO_WARNING abuse) msebor at gcc dot gnu.org
2021-05-24 22:17 ` msebor at gcc dot gnu.org
2021-06-28 21:20 ` cvs-commit at gcc dot gnu.org
2021-06-28 21:25 ` msebor at gcc dot gnu.org
2022-06-09 23:24 ` ebotcazou at gcc dot gnu.org
2022-06-10  9:03 ` jakub at gcc dot gnu.org
2022-06-10  9:44 ` ebotcazou at gcc dot gnu.org

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).