Pragmas Accepted by GCC

先说下微软的。有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.

posted @   Fun_with_Words  阅读(21)  评论(0编辑  收藏  举报
(评论功能已被禁用)
相关博文:
阅读排行:
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· Manus的开源复刻OpenManus初探
· 三行代码完成国际化适配,妙~啊~
· .NET Core 中如何实现缓存的预热?
· 阿里巴巴 QwQ-32B真的超越了 DeepSeek R-1吗?
历史上的今天:
2021-12-19 百度网盘是如何检测是否安装了客户端的?
2021-12-19 A Child's History of England.59
2021-12-19 EDA学习笔记
2021-12-19 Stockfish和GNU Chess棋力都很强
2021-12-19 PyTorch与张量简介









 和5张牌。

点击右上角即可分享
微信分享提示