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  <g...@integrable-solutions.net>

        * 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 %<auto%> 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;

Reply via email to