aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/parser.c
diff options
context:
space:
mode:
authorFabien Chêne <fabien@gcc.gnu.org>2014-04-09 21:51:17 +0200
committerFabien Chêne <fabien@gcc.gnu.org>2014-04-09 21:51:17 +0200
commit51970b3e3331087ad597ccd3c5df9f788e9fe3e5 (patch)
tree4185d01e85163dfe4b0e683025b0a4d76d49d029 /gcc/cp/parser.c
parentdbe1eced08e1d0bf5a8e3c8b45410110687a6fe6 (diff)
downloadgcc-51970b3e3331087ad597ccd3c5df9f788e9fe3e5.zip
gcc-51970b3e3331087ad597ccd3c5df9f788e9fe3e5.tar.gz
gcc-51970b3e3331087ad597ccd3c5df9f788e9fe3e5.tar.bz2
pt.c (check_template_variable): Check for the return of pedwarn before emitting a note.
2014-04-09 Fabien Chêne <fabien@gcc.gnu.org> * pt.c (check_template_variable): Check for the return of pedwarn before emitting a note. * parser.c (cp_parser_lambda_introducer): Likewise. From-SVN: r209252
Diffstat (limited to 'gcc/cp/parser.c')
-rw-r--r--gcc/cp/parser.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c
index 7bea3d2..f386eed 100644
--- a/gcc/cp/parser.c
+++ b/gcc/cp/parser.c
@@ -8961,10 +8961,10 @@ cp_parser_lambda_introducer (cp_parser* parser, tree lambda_expr)
if (VAR_P (capture_init_expr)
&& decl_storage_duration (capture_init_expr) != dk_auto)
{
- pedwarn (capture_token->location, 0, "capture of variable "
- "%qD with non-automatic storage duration",
- capture_init_expr);
- inform (0, "%q+#D declared here", capture_init_expr);
+ if (pedwarn (capture_token->location, 0, "capture of variable "
+ "%qD with non-automatic storage duration",
+ capture_init_expr))
+ inform (0, "%q+#D declared here", capture_init_expr);
continue;
}