diff options
author | gdr <gdr@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-07-15 23:31:52 +0000 |
---|---|---|
committer | gdr <gdr@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-07-15 23:31:52 +0000 |
commit | b537a75f6119ad0fa761b732a105d990ad091aae (patch) | |
tree | 8c95ca0c8979930a9bfa16aad26f060327c7ca5b /gcc/diagnostic.c | |
parent | 5fec5f344ce3899592431af2e2c1e588bf579105 (diff) | |
download | gcc-b537a75f6119ad0fa761b732a105d990ad091aae.tar.gz |
PR c++/11531
* diagnostic.c (diagnostic_report_diagnostic): Don't ICE if we're
not recursing on hard error.
(diagnostic_for_decl): Likewise.
* diagnostic.def: Rearrange.
cp/
* typeck.c (check_return_expr): Fix thinko in diagnostic.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@69425 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/diagnostic.c')
-rw-r--r-- | gcc/diagnostic.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/diagnostic.c b/gcc/diagnostic.c index c9bef1a7e4a..34756112d68 100644 --- a/gcc/diagnostic.c +++ b/gcc/diagnostic.c @@ -1020,7 +1020,7 @@ void diagnostic_report_diagnostic (diagnostic_context *context, diagnostic_info *diagnostic) { - if (context->lock++) + if (context->lock++ && diagnostic->kind < DK_SORRY) error_recursion (context); if (diagnostic_count_diagnostic (context, diagnostic)) @@ -1042,7 +1042,7 @@ static void diagnostic_for_decl (diagnostic_context *context, diagnostic_info *diagnostic, tree decl) { - if (context->lock++) + if (context->lock++ && diagnostic->kind < DK_SORRY) error_recursion (context); if (diagnostic_count_diagnostic (context, diagnostic)) |