re PR c/79834 (c/c-parser.c: make code more i18n-friendly)
authorJakub Jelinek <jakub@redhat.com>
Tue, 7 Mar 2017 19:07:44 +0000 (20:07 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Tue, 7 Mar 2017 19:07:44 +0000 (20:07 +0100)
commita71dbc63406e497eb2c1ce395bc90c8facfde89b
treed23939dc7336bec25e04515d44781445d6f46721
parentd8a90142db624db1f1db43de334e98d02a4dcfd2
re PR c/79834 (c/c-parser.c: make code more i18n-friendly)

PR c/79834
c/
* c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
for "may only be used in compound statements" diagnostics, change it
such that the same translatable string is used for all pragmas.  For
PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
diagnostics.
(c_parser_omp_cancellation_point, c_parser_omp_target_update,
c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
"may only be used in compound statements" diagnostics, such that the
same translatable string is used for all pragmas.
cp/
* parser.c (cp_parser_omp_cancellation_point,
cp_parser_omp_target_enter_data, cp_parser_omp_target_exit_data,
cp_parser_omp_target_update): Change "may only be used in compound
statements" diagnostics, such that the same translatable string is
used for all pragmas.
(cp_parser_pragma): Likewise.  Use error_at instead of
cp_parser_error for that diagnostics.
testsuite/
* c-c++-common/goacc/pragma_context.c (f2): Adjust expected
diagnostics.

From-SVN: r245959
gcc/c/ChangeLog
gcc/c/c-parser.c
gcc/cp/ChangeLog
gcc/cp/parser.c
gcc/testsuite/ChangeLog
gcc/testsuite/c-c++-common/goacc/pragma_context.c