diff options
author | Luis Felipe Strano Moraes <luis.strano@gmail.com> | 2015-07-27 22:26:34 +0000 |
---|---|---|
committer | Manuel López-Ibáñez <manu@gcc.gnu.org> | 2015-07-27 22:26:34 +0000 |
commit | 463084746c84205b40c855f1612fcee978d25a4f (patch) | |
tree | f9ad9ba10d8ebce2eaecafbc8ad4e75c3e8bf664 /gcc/c/c-decl.c | |
parent | 160654a0b8108509f30cef9c3b726e330f8c5451 (diff) | |
download | gcc-463084746c84205b40c855f1612fcee978d25a4f.zip gcc-463084746c84205b40c855f1612fcee978d25a4f.tar.gz gcc-463084746c84205b40c855f1612fcee978d25a4f.tar.bz2 |
c-decl.c (get_parm_info): Remove static var.
gcc/c/ChangeLog
2015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
Manuel López-Ibáñez <manu@gcc.gnu.org>
* c-decl.c (get_parm_info): Remove static var. Update warning
message.
gcc/testsuite/ChangeLog
2015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
Manuel López-Ibáñez <manu@gcc.gnu.org>
* gcc.dg/parm-incomplete-1.c: Update.
* gcc.dg/pr18809-1.c: Update.
* gcc.dg/pr27953.c: Update.
* gcc.dg/vla-11.c: Update.
Co-Authored-By: Manuel López-Ibáñez <manu@gcc.gnu.org>
From-SVN: r226274
Diffstat (limited to 'gcc/c/c-decl.c')
-rw-r--r-- | gcc/c/c-decl.c | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/gcc/c/c-decl.c b/gcc/c/c-decl.c index 8b02877..2669764 100644 --- a/gcc/c/c-decl.c +++ b/gcc/c/c-decl.c @@ -6897,7 +6897,6 @@ get_parm_info (bool ellipsis, tree expr) tree types = 0; tree others = 0; - static bool explained_incomplete_types = false; bool gave_void_only_once_err = false; arg_info->had_vla_unspec = current_scope->had_vla_unspec; @@ -7000,19 +6999,16 @@ get_parm_info (bool ellipsis, tree expr) { if (b->id) /* The %s will be one of 'struct', 'union', or 'enum'. */ - warning (0, "%<%s %E%> declared inside parameter list", - keyword, b->id); + warning_at (input_location, 0, + "%<%s %E%> declared inside parameter list" + " will not be visible outside of this definition or" + " declaration", keyword, b->id); else /* The %s will be one of 'struct', 'union', or 'enum'. */ - warning (0, "anonymous %s declared inside parameter list", - keyword); - - if (!explained_incomplete_types) - { - warning (0, "its scope is only this definition or declaration," - " which is probably not what you want"); - explained_incomplete_types = true; - } + warning_at (input_location, 0, + "anonymous %s declared inside parameter list" + " will not be visible outside of this definition or" + " declaration", keyword); } tag.id = b->id; |