diff options
author | mpolacek <mpolacek@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-06-18 07:41:19 +0000 |
---|---|---|
committer | mpolacek <mpolacek@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-06-18 07:41:19 +0000 |
commit | 01e6cdb4521ff18a9eecca30cccf37f02df98b05 (patch) | |
tree | b8b63c55c1422f16decfa41d1211602d71e3a3c9 /gcc/c | |
parent | efb66c8da3bf4104cae286f2429585d009ba0205 (diff) | |
download | ppe42-gcc-01e6cdb4521ff18a9eecca30cccf37f02df98b05.tar.gz ppe42-gcc-01e6cdb4521ff18a9eecca30cccf37f02df98b05.zip |
PR c/57630
* c-decl.c (check_for_loop_decls): Improve diagnostics messages.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@200163 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c')
-rw-r--r-- | gcc/c/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/c/c-decl.c | 5 |
2 files changed, 8 insertions, 2 deletions
diff --git a/gcc/c/ChangeLog b/gcc/c/ChangeLog index 6179c3bb546..05766caa8ff 100644 --- a/gcc/c/ChangeLog +++ b/gcc/c/ChangeLog @@ -1,3 +1,8 @@ +2013-06-18 Marek Polacek <polacek@redhat.com> + + PR c/57630 + * c-decl.c (check_for_loop_decls): Improve diagnostics messages. + 2013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com> * c-array-notation.c (build_array_notation_expr): Reject array notation diff --git a/gcc/c/c-decl.c b/gcc/c/c-decl.c index d9bbf5c25f9..8170a80ac6d 100644 --- a/gcc/c/c-decl.c +++ b/gcc/c/c-decl.c @@ -8503,11 +8503,12 @@ check_for_loop_decls (location_t loc, bool turn_off_iso_c99_error) the C99 for loop scope. This doesn't make much sense, so don't allow it. */ error_at (loc, "%<for%> loop initial declarations " - "are only allowed in C99 mode"); + "are only allowed in C99 or C11 mode"); if (hint) { inform (loc, - "use option -std=c99 or -std=gnu99 to compile your code"); + "use option -std=c99, -std=gnu99, -std=c11 or -std=gnu11 " + "to compile your code"); hint = false; } return NULL_TREE; |