* [PATCH] fortran: remove trailing exclamation mark from various diagnostics (PR fortran/79852)
@ 2017-03-15 0:31 David Malcolm
2017-03-15 3:35 ` Jerry DeLisle
0 siblings, 1 reply; 4+ messages in thread
From: David Malcolm @ 2017-03-15 0:31 UTC (permalink / raw)
To: fortran; +Cc: David Malcolm
PR fortran/79852 reports various Fortran diagnostics that have a trailing
exclamation mark in their messages.
Is there a Fortran-specific convention here?
Otherwise, this patch removes the trailing exclamation marks.
Successfully bootstrapped®rtested on x86_64-pc-linux-gnu.
OK for trunk? (either now in stage 4, or for next stage1?)
gcc/fortran/ChangeLog:
PR fortran/79852
* bbt.c (insert): Remove trailing exclamation mark from message.
* decl.c (gfc_match_final_decl): Likewise.
* dump-parse-tree.c (show_expr): Likewise.
* module.c (gfc_use_module): Likewise.
* primary.c (build_actual_constructor): Likewise.
(gfc_convert_to_structure_constructor): Likewise.
---
gcc/fortran/bbt.c | 2 +-
gcc/fortran/decl.c | 2 +-
gcc/fortran/dump-parse-tree.c | 2 +-
gcc/fortran/module.c | 2 +-
gcc/fortran/primary.c | 12 ++++++------
5 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/gcc/fortran/bbt.c b/gcc/fortran/bbt.c
index 37b5dc3..5cf5ef5 100644
--- a/gcc/fortran/bbt.c
+++ b/gcc/fortran/bbt.c
@@ -116,7 +116,7 @@ insert (gfc_bbt *new_bbt, gfc_bbt *t, compare_fn compare)
t = rotate_left (t);
}
else /* if (c == 0) */
- gfc_internal_error("insert_bbt(): Duplicate key found!");
+ gfc_internal_error("insert_bbt(): Duplicate key found");
return t;
}
diff --git a/gcc/fortran/decl.c b/gcc/fortran/decl.c
index 52de1c1..93fadca 100644
--- a/gcc/fortran/decl.c
+++ b/gcc/fortran/decl.c
@@ -9950,7 +9950,7 @@ gfc_match_final_decl (void)
for (f = block->f2k_derived->finalizers; f; f = f->next)
if (f->proc_sym == sym)
{
- gfc_error ("%qs at %C is already defined as FINAL procedure!",
+ gfc_error ("%qs at %C is already defined as FINAL procedure",
name);
return MATCH_ERROR;
}
diff --git a/gcc/fortran/dump-parse-tree.c b/gcc/fortran/dump-parse-tree.c
index 87a5304..ede599d 100644
--- a/gcc/fortran/dump-parse-tree.c
+++ b/gcc/fortran/dump-parse-tree.c
@@ -573,7 +573,7 @@ show_expr (gfc_expr *p)
default:
gfc_internal_error
- ("show_expr(): Bad intrinsic in expression!");
+ ("show_expr(): Bad intrinsic in expression");
}
show_expr (p->value.op.op1);
diff --git a/gcc/fortran/module.c b/gcc/fortran/module.c
index 5515fed..cc4e12f 100644
--- a/gcc/fortran/module.c
+++ b/gcc/fortran/module.c
@@ -6996,7 +6996,7 @@ gfc_use_module (gfc_use_list *module)
for (p = gfc_state_stack; p; p = p->previous)
if ((p->state == COMP_MODULE || p->state == COMP_SUBMODULE)
&& strcmp (p->sym->name, module_name) == 0)
- gfc_fatal_error ("Can't USE the same %smodule we're building!",
+ gfc_fatal_error ("Can't USE the same %smodule we're building",
p->state == COMP_SUBMODULE ? "sub" : "");
init_pi_tree ();
diff --git a/gcc/fortran/primary.c b/gcc/fortran/primary.c
index d7fc6c4..7b5ac5f 100644
--- a/gcc/fortran/primary.c
+++ b/gcc/fortran/primary.c
@@ -2677,7 +2677,7 @@ build_actual_constructor (gfc_structure_ctor_component **comp_head,
else if (!comp->attr.artificial)
{
gfc_error ("No initializer for component %qs given in the"
- " structure constructor at %C!", comp->name);
+ " structure constructor at %C", comp->name);
return false;
}
}
@@ -2760,13 +2760,13 @@ gfc_convert_to_structure_constructor (gfc_expr *e, gfc_symbol *sym, gfc_expr **c
{
if (last_name)
gfc_error ("Component initializer without name after component"
- " named %s at %L!", last_name,
+ " named %s at %L", last_name,
actual->expr ? &actual->expr->where
: &gfc_current_locus);
else
gfc_error ("Too many components in structure constructor at "
- "%L!", actual->expr ? &actual->expr->where
- : &gfc_current_locus);
+ "%L", actual->expr ? &actual->expr->where
+ : &gfc_current_locus);
goto cleanup;
}
@@ -2802,7 +2802,7 @@ gfc_convert_to_structure_constructor (gfc_expr *e, gfc_symbol *sym, gfc_expr **c
if (!strcmp (comp_iter->name, comp_tail->name))
{
gfc_error ("Component %qs is initialized twice in the structure"
- " constructor at %L!", comp_tail->name,
+ " constructor at %L", comp_tail->name,
comp_tail->val ? &comp_tail->where
: &gfc_current_locus);
goto cleanup;
@@ -2814,7 +2814,7 @@ gfc_convert_to_structure_constructor (gfc_expr *e, gfc_symbol *sym, gfc_expr **c
&& gfc_is_coindexed (comp_tail->val))
{
gfc_error ("Coindexed expression to pointer component %qs in "
- "structure constructor at %L!", comp_tail->name,
+ "structure constructor at %L", comp_tail->name,
&comp_tail->where);
goto cleanup;
}
--
1.8.5.3
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] fortran: remove trailing exclamation mark from various diagnostics (PR fortran/79852)
2017-03-15 0:31 [PATCH] fortran: remove trailing exclamation mark from various diagnostics (PR fortran/79852) David Malcolm
@ 2017-03-15 3:35 ` Jerry DeLisle
2017-03-15 5:47 ` Steve Kargl
0 siblings, 1 reply; 4+ messages in thread
From: Jerry DeLisle @ 2017-03-15 3:35 UTC (permalink / raw)
To: David Malcolm, fortran
On 03/14/2017 06:01 PM, David Malcolm wrote:
> PR fortran/79852 reports various Fortran diagnostics that have a trailing
> exclamation mark in their messages.
>
> Is there a Fortran-specific convention here?
>
No reason at all.
> Otherwise, this patch removes the trailing exclamation marks.
>
> Successfully bootstrapped®rtested on x86_64-pc-linux-gnu.
>
> OK for trunk? (either now in stage 4, or for next stage1?)
>
Yes, OK.
Thanks for patch.
Jerry
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] fortran: remove trailing exclamation mark from various diagnostics (PR fortran/79852)
2017-03-15 3:35 ` Jerry DeLisle
@ 2017-03-15 5:47 ` Steve Kargl
2017-03-15 17:28 ` Jerry DeLisle
0 siblings, 1 reply; 4+ messages in thread
From: Steve Kargl @ 2017-03-15 5:47 UTC (permalink / raw)
To: Jerry DeLisle; +Cc: David Malcolm, fortran
On Tue, Mar 14, 2017 at 08:35:50PM -0700, Jerry DeLisle wrote:
> On 03/14/2017 06:01 PM, David Malcolm wrote:
> > PR fortran/79852 reports various Fortran diagnostics that have a trailing
> > exclamation mark in their messages.
> >
> > Is there a Fortran-specific convention here?
> >
>
> No reason at all.
One occurs in a gfc_internal_error() and if we hit that then
there is a MAJOR fly in the ointment. An exclamation is
probably appropriate; Oh, and I have triggered that very
error. Another appears in a gcc_fatal_error(). If a user
hits that, then an exclamation is merited in that the user's
code is so poorly written one can only exclaim.
--
Steve
20161221 https://www.youtube.com/watch?v=IbCHE-hONow
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] fortran: remove trailing exclamation mark from various diagnostics (PR fortran/79852)
2017-03-15 5:47 ` Steve Kargl
@ 2017-03-15 17:28 ` Jerry DeLisle
0 siblings, 0 replies; 4+ messages in thread
From: Jerry DeLisle @ 2017-03-15 17:28 UTC (permalink / raw)
To: sgk; +Cc: David Malcolm, fortran
On 03/14/2017 10:47 PM, Steve Kargl wrote:
> On Tue, Mar 14, 2017 at 08:35:50PM -0700, Jerry DeLisle wrote:
>> On 03/14/2017 06:01 PM, David Malcolm wrote:
>>> PR fortran/79852 reports various Fortran diagnostics that have a trailing
>>> exclamation mark in their messages.
>>>
>>> Is there a Fortran-specific convention here?
>>>
>>
>> No reason at all.
>
> One occurs in a gfc_internal_error() and if we hit that then
> there is a MAJOR fly in the ointment. An exclamation is
> probably appropriate; Oh, and I have triggered that very
> error. Another appears in a gcc_fatal_error(). If a user
> hits that, then an exclamation is merited in that the user's
> code is so poorly written one can only exclaim.
>
maybe instead of exclamation point we should do
...., are you serious?
;)
Jerry
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-03-15 17:28 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-15 0:31 [PATCH] fortran: remove trailing exclamation mark from various diagnostics (PR fortran/79852) David Malcolm
2017-03-15 3:35 ` Jerry DeLisle
2017-03-15 5:47 ` Steve Kargl
2017-03-15 17:28 ` Jerry DeLisle
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).