From c7afb7822660a768be77fbeb63f93205e9ca9cd9 Mon Sep 17 00:00:00 2001 From: mpolacek Date: Thu, 1 Sep 2016 14:59:50 +0000 Subject: PR c/7652 gcc/c-family/ * c-common.c (resolve_overloaded_builtin): Fix formatting. Add FALLTHRU comments. gcc/c/ * c-typeck.c (composite_type): Add FALLTHRU comment. gcc/gcc/cp/ * error.c (dump_type): Fix falls through comment. (dump_decl): Likewise. (dump_expr): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@239939 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/cp/error.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gcc/cp/error.c') diff --git a/gcc/cp/error.c b/gcc/cp/error.c index 58cd48c0a14..88049ee8f1a 100644 --- a/gcc/cp/error.c +++ b/gcc/cp/error.c @@ -575,7 +575,7 @@ dump_type (cxx_pretty_printer *pp, tree t, int flags) default: pp_unsupported_tree (pp, t); - /* Fall through to error. */ + /* Fall through. */ case ERROR_MARK: pp_string (pp, M_("")); @@ -1276,7 +1276,7 @@ dump_decl (cxx_pretty_printer *pp, tree t, int flags) default: pp_unsupported_tree (pp, t); - /* Fall through to error. */ + /* Fall through. */ case ERROR_MARK: pp_string (pp, M_("")); @@ -2777,7 +2777,7 @@ dump_expr (cxx_pretty_printer *pp, tree t, int flags) `report_error_function'. That could cause an infinite loop. */ default: pp_unsupported_tree (pp, t); - /* fall through to ERROR_MARK... */ + /* Fall through. */ case ERROR_MARK: pp_string (pp, M_("")); break; -- cgit v1.2.1 From e6db887a54f49ed28f49371d3326cd0143cc7f18 Mon Sep 17 00:00:00 2001 From: jakub Date: Fri, 16 Sep 2016 20:25:17 +0000 Subject: PR c++/77482 * error.c (dump_simple_decl): Only check DECL_DECLARED_CONCEPT_P if DECL_LANG_SPECIFIC is non-NULL. Fix up formatting. * g++.dg/cpp0x/constexpr-77482.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@240198 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/cp/error.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'gcc/cp/error.c') diff --git a/gcc/cp/error.c b/gcc/cp/error.c index 88049ee8f1a..ca7360fa602 100644 --- a/gcc/cp/error.c +++ b/gcc/cp/error.c @@ -959,14 +959,13 @@ dump_simple_decl (cxx_pretty_printer *pp, tree t, tree type, int flags) { if (flags & TFF_DECL_SPECIFIERS) { - if (VAR_P (t) - && DECL_DECLARED_CONSTEXPR_P (t)) - { - if (DECL_DECLARED_CONCEPT_P (t)) - pp_cxx_ws_string (pp, "concept"); - else - pp_cxx_ws_string (pp, "constexpr"); - } + if (VAR_P (t) && DECL_DECLARED_CONSTEXPR_P (t)) + { + if (DECL_LANG_SPECIFIC (t) && DECL_DECLARED_CONCEPT_P (t)) + pp_cxx_ws_string (pp, "concept"); + else + pp_cxx_ws_string (pp, "constexpr"); + } dump_type_prefix (pp, type, flags & ~TFF_UNQUALIFIED_NAME); pp_maybe_space (pp); } -- cgit v1.2.1