From: Thomas Schwinge <thomas@codesourcery.com>
To: Jakub Jelinek <jakub@redhat.com>, <gcc-patches@gcc.gnu.org>
Subject: Re: [PR middle-end/71373] Document missing OMP_CLAUSE_* in gcc/tree-nested.c
Date: Mon, 13 Jun 2016 14:48:00 -0000 [thread overview]
Message-ID: <874m8xqh5w.fsf@hertz.schwinge.homeip.net> (raw)
In-Reply-To: <877fdtqhde.fsf@hertz.schwinge.homeip.net>
Hi!
On Mon, 13 Jun 2016 16:43:25 +0200, Thomas Schwinge <thomas@codesourcery.com> wrote:
> On Wed, 01 Jun 2016 17:06:42 +0200, Thomas Schwinge <thomas@codesourcery.com> wrote:
> > Here are the OpenACC bits of <http://gcc.gnu.org/PR71373>.
>
> In the PR, Jakub clarified that all the missing other OMP_CLAUSE_* are in
> fact all unreachable here. [...]
>
> The "anything else" default case in fact now is just the non-clause
> OMP_CLAUSE_ERROR, so when adding a case for that one, we could then
> remove the default case, and thus get a compiler warning when new clauses
> are added in the future, without handling them here. That makes sense to
> me (would have made apparent much earlier the original problem of missing
> handling for certain OMP_CLAUSE_*), but based on feedback received, it
> feels as if I'm the only supporter of such "defensive" programming
> paradigms?
That is, something like that:
--- gcc/tree-nested.c
+++ gcc/tree-nested.c
@@ -1225,8 +1225,9 @@ convert_nonlocal_omp_clauses (tree *pclauses, struct walk_stmt_info *wi)
case OMP_CLAUSE__LOOPTEMP_:
case OMP_CLAUSE__SIMDUID_:
case OMP_CLAUSE__GRIDDIM_:
- /* Anything else. */
- default:
+ /* This non-clause should never be seen outside of the front
+ ends. */
+ case OMP_CLAUSE_ERROR:
gcc_unreachable ();
}
}
@@ -1933,8 +1934,9 @@ convert_local_omp_clauses (tree *pclauses, struct walk_stmt_info *wi)
case OMP_CLAUSE__LOOPTEMP_:
case OMP_CLAUSE__SIMDUID_:
case OMP_CLAUSE__GRIDDIM_:
- /* Anything else. */
- default:
+ /* This non-clause should never be seen outside of the front
+ ends. */
+ case OMP_CLAUSE_ERROR:
gcc_unreachable ();
}
}
Grüße
Thomas
next prev parent reply other threads:[~2016-06-13 14:48 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-01 15:07 [PR middle-end/71373] Handle more OMP_CLAUSE_* in nested function decomposition Thomas Schwinge
2016-06-01 15:12 ` Jakub Jelinek
2016-06-02 16:21 ` Thomas Schwinge
2016-06-02 16:25 ` Jakub Jelinek
2016-06-10 10:36 ` Thomas Schwinge
2016-06-13 14:43 ` [PR middle-end/71373] Document missing OMP_CLAUSE_* in gcc/tree-nested.c Thomas Schwinge
2016-06-13 14:48 ` Thomas Schwinge [this message]
2016-06-13 14:49 ` Jakub Jelinek
2016-06-13 16:41 ` Thomas Schwinge
-- strict thread matches above, loose matches on Subject: below --
2014-07-18 21:41 [patch,gomp-4_0-branch] acc nested function support Cesar Philippidis
2014-07-29 8:30 ` Thomas Schwinge
2014-11-05 0:45 ` Cesar Philippidis
2014-11-05 15:24 ` David Malcolm
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=874m8xqh5w.fsf@hertz.schwinge.homeip.net \
--to=thomas@codesourcery.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=jakub@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).