This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PR c/65586: Skipping omp pragmas with -fopenmp-simd
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Tobias Burnus <tobias dot burnus at physik dot fu-berlin dot de>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Fri, 27 Mar 2015 11:06:30 +0100
- Subject: Re: PR c/65586: Skipping omp pragmas with -fopenmp-simd
- Authentication-results: sourceware.org; auth=none
- References: <20150327095814 dot GB29713 at physik dot fu-berlin dot de>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Fri, Mar 27, 2015 at 10:58:14AM +0100, Tobias Burnus wrote:
> For -fopenmp-simd, GCC did not properly jump passed the clauses of
> ignored directives. It worked, for "for simd" directives and for
> those without clauses.
>
> Bootstrapped and regtested on x86-64-gnu-linux.
> OK for the trunk?
>
> Tobias
> + while (true)
> + {
> + c_token *token = c_parser_peek_token (parser);
> + if (token->type == CPP_EOF)
> + break;
> + if (token->type == CPP_PRAGMA_EOL)
> + {
> + c_parser_consume_token (parser);
> break;
> - if (token->type == CPP_PRAGMA_EOL)
> - {
> - c_parser_consume_token (parser);
> - break;
> - }
> - c_parser_consume_token (parser);
> - }
> + }
> + c_parser_consume_token (parser);
> + }
Can't you use
cpp_ttype token_type;
do
{
c_token *token = c_parser_peek_token (parser);
token_type = token->type;
if (token_type == CPP_EOF)
break;
c_parser_consume_token (parser);
}
while (token_type != CPP_PRAGMA_EOL);
instead?
Ok either way.
Jakub