mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-04 04:40:27 +08:00
Fix some bool vs. tree confusion.
gcc/c/ * c-parser.c (c_parser_omp_target): Return bool values. gcc/cp/ * parser.c (cp_parser_omp_target): Return bool values. From-SVN: r210851
This commit is contained in:
parent
d90838f96c
commit
edbba2ceb5
@ -1,3 +1,7 @@
|
||||
2014-05-23 Thomas Schwinge <thomas@codesourcery.com>
|
||||
|
||||
* c-parser.c (c_parser_omp_target): Return bool values.
|
||||
|
||||
2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
|
||||
|
||||
* c-parser.c (c_parser_omp_clause_thread_limit): Rename
|
||||
|
@ -12720,15 +12720,19 @@ c_parser_omp_target (c_parser *parser, enum pragma_context context)
|
||||
c_parser_consume_token (parser);
|
||||
strcpy (p_name, "#pragma omp target");
|
||||
if (!flag_openmp) /* flag_openmp_simd */
|
||||
return c_parser_omp_teams (loc, parser, p_name,
|
||||
OMP_TARGET_CLAUSE_MASK, cclauses);
|
||||
{
|
||||
tree stmt = c_parser_omp_teams (loc, parser, p_name,
|
||||
OMP_TARGET_CLAUSE_MASK,
|
||||
cclauses);
|
||||
return stmt != NULL_TREE;
|
||||
}
|
||||
keep_next_level ();
|
||||
tree block = c_begin_compound_stmt (true);
|
||||
tree ret = c_parser_omp_teams (loc, parser, p_name,
|
||||
OMP_TARGET_CLAUSE_MASK, cclauses);
|
||||
block = c_end_compound_stmt (loc, block, true);
|
||||
if (ret == NULL)
|
||||
return ret;
|
||||
if (ret == NULL_TREE)
|
||||
return false;
|
||||
tree stmt = make_node (OMP_TARGET);
|
||||
TREE_TYPE (stmt) = void_type_node;
|
||||
OMP_TARGET_CLAUSES (stmt) = cclauses[C_OMP_CLAUSE_SPLIT_TARGET];
|
||||
@ -12739,7 +12743,7 @@ c_parser_omp_target (c_parser *parser, enum pragma_context context)
|
||||
else if (!flag_openmp) /* flag_openmp_simd */
|
||||
{
|
||||
c_parser_skip_to_pragma_eol (parser);
|
||||
return NULL_TREE;
|
||||
return false;
|
||||
}
|
||||
else if (strcmp (p, "data") == 0)
|
||||
{
|
||||
|
@ -1,3 +1,7 @@
|
||||
2014-05-23 Thomas Schwinge <thomas@codesourcery.com>
|
||||
|
||||
* parser.c (cp_parser_omp_target): Return bool values.
|
||||
|
||||
2014-05-22 Paolo Carlini <paolo.carlini@oracle.com>
|
||||
|
||||
PR c++/61088
|
||||
|
@ -30337,8 +30337,12 @@ cp_parser_omp_target (cp_parser *parser, cp_token *pragma_tok,
|
||||
cp_lexer_consume_token (parser->lexer);
|
||||
strcpy (p_name, "#pragma omp target");
|
||||
if (!flag_openmp) /* flag_openmp_simd */
|
||||
return cp_parser_omp_teams (parser, pragma_tok, p_name,
|
||||
OMP_TARGET_CLAUSE_MASK, cclauses);
|
||||
{
|
||||
tree stmt = cp_parser_omp_teams (parser, pragma_tok, p_name,
|
||||
OMP_TARGET_CLAUSE_MASK,
|
||||
cclauses);
|
||||
return stmt != NULL_TREE;
|
||||
}
|
||||
keep_next_level (true);
|
||||
tree sb = begin_omp_structured_block ();
|
||||
unsigned save = cp_parser_begin_omp_structured_block (parser);
|
||||
@ -30346,8 +30350,8 @@ cp_parser_omp_target (cp_parser *parser, cp_token *pragma_tok,
|
||||
OMP_TARGET_CLAUSE_MASK, cclauses);
|
||||
cp_parser_end_omp_structured_block (parser, save);
|
||||
tree body = finish_omp_structured_block (sb);
|
||||
if (ret == NULL)
|
||||
return ret;
|
||||
if (ret == NULL_TREE)
|
||||
return false;
|
||||
tree stmt = make_node (OMP_TARGET);
|
||||
TREE_TYPE (stmt) = void_type_node;
|
||||
OMP_TARGET_CLAUSES (stmt) = cclauses[C_OMP_CLAUSE_SPLIT_TARGET];
|
||||
@ -30358,7 +30362,7 @@ cp_parser_omp_target (cp_parser *parser, cp_token *pragma_tok,
|
||||
else if (!flag_openmp) /* flag_openmp_simd */
|
||||
{
|
||||
cp_parser_require_pragma_eol (parser, pragma_tok);
|
||||
return NULL_TREE;
|
||||
return false;
|
||||
}
|
||||
else if (strcmp (p, "data") == 0)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user