From patchwork Sat Nov 17 16:50:50 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: C++ PATCH: tidy diagnostic about invalid of use of automatic variable From: Gabriel Dos Reis X-Patchwork-Id: 199865 Message-Id: <87lie0fa1h.fsf@gauss.cs.tamu.edu> To: gcc-patches@gcc.gnu.org Date: Sat, 17 Nov 2012 10:50:50 -0600 Now that we can actually declare a variable as `auto', it becomes important to be precise in our terminology when diagnosing invalid uses of variables with automatic storage -- especially if the variable isn't declared 'auto'. Applied to trunk. -- Gaby 2012-11-17 Gabriel Dos Reis * semantics.c (finish_id_expression): Tidy diagnostic message. Index: semantics.c =================================================================== --- semantics.c (revision 193586) +++ semantics.c (working copy) @@ -3041,7 +3041,7 @@ else { error (TREE_CODE (decl) == VAR_DECL - ? G_("use of % variable from containing function") + ? G_("use of local variable with automatic storage from containing function") : G_("use of parameter from containing function")); error (" %q+#D declared here", decl); return error_mark_node;