diff options
author | Jakub Jelinek <jakub@redhat.com> | 2016-02-19 23:12:54 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2016-02-19 23:12:54 +0100 |
commit | 871b3f473a4bca51d05c1682efb5017385ec9e9e (patch) | |
tree | ad24c0977ac86141c53e210365c0fdb3a06892eb /gcc/c-family/c-pragma.c | |
parent | 77a37715c6064b4253dc16d7a69ab1751f30a79a (diff) | |
download | gcc-871b3f473a4bca51d05c1682efb5017385ec9e9e.zip gcc-871b3f473a4bca51d05c1682efb5017385ec9e9e.tar.gz gcc-871b3f473a4bca51d05c1682efb5017385ec9e9e.tar.bz2 |
re PR c++/69826 (problem with cilkplus pragma and preprocessor variable)
PR c++/69826
* c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_GRAINSIZE.
(init_pragma): Register PRAGMA_CILK_GRAINSIZE even for
flag_preprocess_only.
* c-c++-common/cilk-plus/CK/pr69826-1.c: New test.
* c-c++-common/cilk-plus/CK/pr69826-2.c: New test.
From-SVN: r233571
Diffstat (limited to 'gcc/c-family/c-pragma.c')
-rw-r--r-- | gcc/c-family/c-pragma.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/gcc/c-family/c-pragma.c b/gcc/c-family/c-pragma.c index 38aabc0..c73aa82 100644 --- a/gcc/c-family/c-pragma.c +++ b/gcc/c-family/c-pragma.c @@ -1336,6 +1336,13 @@ c_pp_lookup_pragma (unsigned int id, const char **space, const char **name) return; } + if (id == PRAGMA_CILK_GRAINSIZE) + { + *space = "cilk"; + *name = "grainsize"; + return; + } + if (id >= PRAGMA_FIRST_EXTERNAL && (id < PRAGMA_FIRST_EXTERNAL + registered_pp_pragmas.length ())) { @@ -1523,7 +1530,7 @@ init_pragma (void) cpp_register_deferred_pragma (parse_in, "GCC", "ivdep", PRAGMA_IVDEP, false, false); - if (flag_cilkplus && !flag_preprocess_only) + if (flag_cilkplus) cpp_register_deferred_pragma (parse_in, "cilk", "grainsize", PRAGMA_CILK_GRAINSIZE, true, false); |