先说下微软的。有disable,但没有enable,有的是default: Reset warning behavior to its default value. BitBlt有SRCAND, 没有SRCOR, use SRCPAINT instead.
warning pragma | Compiler warnings that are off by default
Pragmas (Using the GNU Compiler Collection (GCC))
Structure-Layout Pragmas... For compatibility with Microsoft Windows compilers, GCC supports a set of #pragma directives that change the maximum alignment of members of structures (other than zero-width bit-fields), unions, and classes subsequently defined.
For compatibility with Microsoft Windows compilers, GCC supports ‘#pragma push_macro("macro_name")’ and ‘#pragma pop_macro("macro_name")’.
#pragma GCC diagnostic warning "-Wformat"
#pragma GCC diagnostic error "-Wformat"
#pragma GCC diagnostic ignored "-Wformat"
#pragma GCC diagnostic push
#pragma GCC diagnostic pop
#pragma message string
#pragma GCC error message
#pragma GCC optimize (string, …) allows you to set global optimization options for functions defined later in the source file. One or more strings can be specified.
#pragma GCC ivdep With this pragma, the programmer asserts that there are no loop-carried dependencies which would prevent consecutive iterations of the following loop from executing concurrently with SIMD (single instruction multiple data) instructions. for (i = 0; i < n; ++i) a[i] = b[i] + c[i];
#pragma GCC unroll n You can use this pragma to control how many times a loop should be unrolled. It must be placed immediately before a for, while or do loop or a #pragma GCC ivdep, and applies only to the loop that follows. n is an integer constant expression specifying the unrolling factor. The values of 0 and 1 block any unrolling of the loop.
标签:GCC,Pragmas,macro,diagnostic,pragma,Accepted,loop From: https://www.cnblogs.com/funwithwords/p/16993374.html