Tobias Burnus
0078a058a5
libcpp: Fix _Pragma expansion [PR102409]
Both #pragma and _Pragma ended up as CPP_PRAGMA. Presumably since r131819 (2008, GCC 4.3) for PR34692, pragmas are not expanded in macro arguments but are output as is before. From the old bug report, that was to fix usage like FOO ( #pragma GCC diagnostic ) However, that change also affected _Pragma such that BAR ( "1"; _Pragma("omp ..."); ) yielded #pragma omp ... followed by what BAR expanded too, possibly including '"1";'. This commit adds a flag, PRAGMA_OP, to tokens to make the two distinguishable - and include again _Pragma in the expanded arguments. libcpp/ChangeLog: PR c++/102409 * directives.c (destringize_and_run): Add PRAGMA_OP to the CPP_PRAGMA token's flags to mark is as coming from _Pragma. * include/cpplib.h (PRAGMA_OP): #define, to be used with token flags. * macro.c (collect_args): Only handle CPP_PRAGMA special if PRAGMA_OP is set. gcc/testsuite/ChangeLog: * c-c++-common/gomp/pragma-1.c: New test. * c-c++-common/gomp/pragma-2.c: New test.
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
This directory contains the GNU Compiler Collection (GCC). The GNU Compiler Collection is free software. See the files whose names start with COPYING for copying permission. The manuals, and some of the runtime libraries, are under different terms; see the individual source files for details. The directory INSTALL contains copies of the installation information as HTML and plain text. The source of this information is gcc/doc/install.texi. The installation information includes details of what is included in the GCC sources and what files GCC installs. See the file gcc/doc/gcc.texi (together with other files that it includes) for usage and porting information. An online readable version of the manual is in the files gcc/doc/gcc.info*. See http://gcc.gnu.org/bugs/ for how to report bugs usefully. Copyright years on GCC source files may be listed using range notation, e.g., 1987-2012, indicating that every year in the range, inclusive, is a copyrightable year that could otherwise be listed individually.
Description
Languages
C
48%
Ada
18.3%
C++
14.1%
Go
7%
GCC Machine Description
4.6%
Other
7.7%