public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/81692] Bogus noreturn warning
       [not found] <bug-81692-4@http.gcc.gnu.org/bugzilla/>
@ 2020-03-16 17:52 ` msebor at gcc dot gnu.org
  2021-12-17  5:22 ` pinskia at gcc dot gnu.org
  2021-12-17  5:24 ` pinskia at gcc dot gnu.org
  2 siblings, 0 replies; 3+ messages in thread
From: msebor at gcc dot gnu.org @ 2020-03-16 17:52 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |msebor at gcc dot gnu.org
      Known to fail|                            |10.0, 7.3.0, 8.2.0, 9.2.0

--- Comment #2 from Martin Sebor <msebor at gcc dot gnu.org> ---
Reconfirming with GCC 10.  The attribute is accepted and has the expected
effect in the middle-end but not in the C++ front-end.

$ cat pr81692.C && gcc -O2 -S -Wall -Wextra -Wpedantic
-fdump-tree-optimized=/dev/stdout pr81692.C 
template <class E>
__attribute__ ((noreturn))
void throw_exception (const char*);

template <class E>
int foo (int *p)
{
  throw_exception<E>(__PRETTY_FUNCTION__);
  *p = 0;   // eliminated
}

template int foo<int>(int*);
pr81692.C: In function ‘int foo(int*)’:
pr81692.C:10:1: warning: no return statement in function returning non-void
[-Wreturn-type]
   10 | }
      | ^

;; Function foo<int> (_Z3fooIiEiPi, funcdef_no=1, decl_uid=2339, cgraph_uid=1,
symbol_order=0)

foo<int> (int * p)
{
  <bb 2> [local count: 1073741824]:
  throw_exception<int> ("int foo(int*) [with E = int]");

}

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

* [Bug c++/81692] Bogus noreturn warning
       [not found] <bug-81692-4@http.gcc.gnu.org/bugzilla/>
  2020-03-16 17:52 ` [Bug c++/81692] Bogus noreturn warning msebor at gcc dot gnu.org
@ 2021-12-17  5:22 ` pinskia at gcc dot gnu.org
  2021-12-17  5:24 ` pinskia at gcc dot gnu.org
  2 siblings, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-12-17  5:22 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |needs-bisection

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Looks to be fixed in GCC 8.5.0, GCC 9.4.0 and GCC 10+.

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

* [Bug c++/81692] Bogus noreturn warning
       [not found] <bug-81692-4@http.gcc.gnu.org/bugzilla/>
  2020-03-16 17:52 ` [Bug c++/81692] Bogus noreturn warning msebor at gcc dot gnu.org
  2021-12-17  5:22 ` pinskia at gcc dot gnu.org
@ 2021-12-17  5:24 ` pinskia at gcc dot gnu.org
  2 siblings, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-12-17  5:24 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |DUPLICATE

--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Even though PR 94742 is newer, it has already been marked as fixed and records
the commit which fixed this issue and all.

*** This bug has been marked as a duplicate of bug 94742 ***

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

end of thread, other threads:[~2021-12-17  5:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-81692-4@http.gcc.gnu.org/bugzilla/>
2020-03-16 17:52 ` [Bug c++/81692] Bogus noreturn warning msebor at gcc dot gnu.org
2021-12-17  5:22 ` pinskia at gcc dot gnu.org
2021-12-17  5:24 ` pinskia 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).