This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/20000] missing warning for noreturn function returning non-void
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 16 Feb 2005 06:45:51 -0000
- Subject: [Bug c/20000] missing warning for noreturn function returning non-void
- References: <20050216064218.20000.jsm28@gcc.gnu.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-02-16 06:45 -------
Confirmed, it is ovbious where the bug is if we look at the source:
/* GNU C interprets a volatile-qualified function type to indicate
that the function does not return. */
if ((type_quals & TYPE_QUAL_VOLATILE)
&& !VOID_TYPE_P (TREE_TYPE (TREE_TYPE (decl))))
warning ("%<noreturn%> function returns non-void value");
We don't check for the attribute at all.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Keywords| |diagnostic
Last reconfirmed|0000-00-00 00:00:00 |2005-02-16 06:45:50
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20000