libcpp: Diagnose __has_include outside of preprocessor directives [PR93545]
authorJakub Jelinek <jakub@redhat.com>
Tue, 4 Feb 2020 12:40:56 +0000 (13:40 +0100)
committerJakub Jelinek <jakub@redhat.com>
Tue, 4 Feb 2020 12:40:56 +0000 (13:40 +0100)
commit59afd6ad83665ad93d3c87af238a21a9c1c38079
treeac4e71a0717ea5285754d91463095ee25f1c3a59
parentf8d6e448f801bcbdaa83c98991b15ed35d1bb3cc
libcpp: Diagnose __has_include outside of preprocessor directives [PR93545]

Add forgotten gcc/testsuite/c-c++-common/gomp/has-include-1.c.

2020-02-04  Jakub Jelinek  <jakub@redhat.com>

* macro.c (builtin_has_include): Diagnose __has_include* use outside
of preprocessing directives.

* c-c++-common/cpp/has-include-1.c: New test.
* c-c++-common/cpp/has-include-next-1.c: New test.
* c-c++-common/gomp/has-include-1.c: New test.
gcc/testsuite/c-c++-common/gomp/has-include-1.c [new file with mode: 0644]