Add test coverage for _Pragma (PR preprocessor 69126, 69543, 69558)
We had some regressions in the ability for _Pragma to disable a warning
(PR preprocessor/69126, PR preprocessor/69543, PR preprocessor/69558).
This patch attempts to add more test coverage for this, for the
various combinations of:
- various warnings:
-Wunused-variable
-Wuninitialized
-Wdeprecated-declarations
- various combinations of location of _Pragma relative to location of
the warning:
- _Pragma is in a macro, warning isn't a macro
- neither is in a macro
- _Pragma isnt't in a macro, warning is in a macro
- in different macros
- both in the same macro
- C vs C++ frontend.
It adds some XFAILs:
- pr69543-1.c for C++ (fixed in the followup patch)
- pr69543-3.c for both C and C++
- pr69543-4.c for both C and C++
- pr69558.c for C++ (moving it from gcc.dg to c-c++-common,
marking it as xfail for C++ for now)
gcc/testsuite/ChangeLog:
PR preprocessor/69126
PR preprocessor/69543
PR preprocessor/69558
* c-c++-common/pr69126.c (MACRO_1, test_1): New.
(f): Rename to...
(test_2): ...this, and add leading comment.
(MACRO_3, test_3): New.
(MACRO_4A, MACRO_4B, test_4): New.
(MACRO): Rename to...
(MACRO_5): ...this.
(g): Rename to...
(test_5): ...this, updating for renaming of MACRO, and
add leading comment.
* c-c++-common/pr69543-1.c: New.
* c-c++-common/pr69543-2.c: New.
* c-c++-common/pr69543-3.c: New.
* c-c++-common/pr69543-4.c: New.
* c-c++-common/pr69558-1.c: New.
* c-c++-common/pr69558-2.c: New.
* c-c++-common/pr69558-3.c: New.
* c-c++-common/pr69558-4.c: New.
* gcc.dg/pr69558.c: Move to...
* c-c++-common/pr69558.c: ...here. Add dg-bogus directives, with
xfail for c++.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@233637 138bc75d-0d04-0410-961f-82ee72b054a4