Commit 11433f42 by Richard Kenner

(grokdeclarator): `volatile' function warning corrected to read

`noreturn' function warning.

From-SVN: r6457
parent 4aea22ca
/* Process declarations and variables for C compiler. /* Process declarations and variables for C compiler.
Copyright (C) 1988, 1992, 1993 Free Software Foundation, Inc. Copyright (C) 1988, 1992, 1993, 1994 Free Software Foundation, Inc.
This file is part of GNU CC. This file is part of GNU CC.
...@@ -4636,7 +4636,7 @@ grokdeclarator (declarator, declspecs, decl_context, initialized) ...@@ -4636,7 +4636,7 @@ grokdeclarator (declarator, declspecs, decl_context, initialized)
if (volatilep if (volatilep
&& TREE_TYPE (TREE_TYPE (decl)) != void_type_node) && TREE_TYPE (TREE_TYPE (decl)) != void_type_node)
warning ("volatile function returns non-void value"); warning ("`noreturn' function returns non-void value");
if (extern_ref) if (extern_ref)
DECL_EXTERNAL (decl) = 1; DECL_EXTERNAL (decl) = 1;
...@@ -6481,7 +6481,7 @@ finish_function (nested) ...@@ -6481,7 +6481,7 @@ finish_function (nested)
current_function_returns_null |= can_reach_end; current_function_returns_null |= can_reach_end;
if (TREE_THIS_VOLATILE (fndecl) && current_function_returns_null) if (TREE_THIS_VOLATILE (fndecl) && current_function_returns_null)
warning ("`volatile' function does return"); warning ("`noreturn' function does return");
else if (warn_return_type && can_reach_end else if (warn_return_type && can_reach_end
&& TYPE_MAIN_VARIANT (TREE_TYPE (TREE_TYPE (fndecl))) != void_type_node) && TYPE_MAIN_VARIANT (TREE_TYPE (TREE_TYPE (fndecl))) != void_type_node)
/* If this function returns non-void and control can drop through, /* If this function returns non-void and control can drop through,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment