From e7c692b2cc5892b87bc7fbe71475340c4f32a7b2 Mon Sep 17 00:00:00 2001 From: Richard Kenner Date: Thu, 10 Feb 1994 19:26:21 -0500 Subject: [PATCH] (c_expand_return): Do not warn about returning the address of a locally declared extern variable. From-SVN: r6526 --- gcc/c-typeck.c | 1 + 1 file changed, 1 insertion(+) diff --git a/gcc/c-typeck.c b/gcc/c-typeck.c index 81dca3ef5a7..0217382aea6 100644 --- a/gcc/c-typeck.c +++ b/gcc/c-typeck.c @@ -6239,6 +6239,7 @@ c_expand_return (retval) inner = TREE_OPERAND (inner, 0); if (TREE_CODE (inner) == VAR_DECL + && ! DECL_EXTERNAL (inner) && ! TREE_STATIC (inner) && DECL_CONTEXT (inner) == current_function_decl) warning ("function returns address of local variable"); -- 2.30.2