This change started with a bugreport about a typo in one requires testcase (diagnosed with -Wunknown-pragmas only), but following discussion lead to noting that we do not diagnose restriction that requires directives in C/C++ may only appear at file or namespace scope; and several our tests violated that. 2020-04-15 Jakub Jelinek <jakub@redhat.com> PR c/94593 * c-parser.c (c_parser_pragma) <case PRAGMA_OMP_REQUIRES>: Reject requires directive when not at file scope. * parser.c (cp_parser_pragma) <case PRAGMA_OMP_REQUIRES>: Reject requires directive when not at file or namespace scope. * c-c++-common/gomp/requires-1.c: Fix a typo, requries -> requires. Move directives to file scope. (i): Remove. * c-c++-common/gomp/requires-2.c: Move directives to file scope. (i, foo): Remove. * c-c++-common/gomp/requires-4.c: Move directives to file scope. * c-c++-common/gomp/atomic-19.c: Move requires directive to file scope. * c-c++-common/gomp/atomic-20.c: Likewise. * c-c++-common/gomp/atomic-21.c: Likewise. * c-c++-common/gomp/atomic-22.c: Likewise. * gcc.dg/gomp/requires-1.c: New test. * g++.dg/gomp/requires-1.C: New test. * g++.dg/gomp/requires-2.C: New test. * g++.dg/gomp/atomic-18.C: Move requires directive to file scope.
Name |
Last commit
|
Last update |
---|---|---|
.. | ||
ChangeLog | Loading commit data... | |
Make-lang.in | Loading commit data... | |
c-aux-info.c | Loading commit data... | |
c-convert.c | Loading commit data... | |
c-decl.c | Loading commit data... | |
c-errors.c | Loading commit data... | |
c-fold.c | Loading commit data... | |
c-lang.c | Loading commit data... | |
c-lang.h | Loading commit data... | |
c-objc-common.c | Loading commit data... | |
c-objc-common.h | Loading commit data... | |
c-parser.c | Loading commit data... | |
c-parser.h | Loading commit data... | |
c-tree.h | Loading commit data... | |
c-typeck.c | Loading commit data... | |
config-lang.in | Loading commit data... | |
gccspec.c | Loading commit data... | |
gimple-parser.c | Loading commit data... | |
gimple-parser.h | Loading commit data... |