首页 > 其他分享 >Pragmas Accepted by GCC

Pragmas Accepted by GCC

时间:2022-12-19 23:22:23浏览次数:183  
标签:GCC Pragmas macro diagnostic pragma Accepted loop

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

相关文章

  • linux程序保护机制&gcc编译选项
    转载自:https://www.jianshu.com/p/91fae054f922总结NX:-zexecstack/-znoexecstack(关闭/开启)Canary:-fno-stack-protector/-fstack-protector/-fstack-protec......
  • 4. gcc预处理汇编编译链接的用法
    普通的C程序如果要成为可执行的程序,需要经过四个步骤1.预处理2.汇编3.编译4.链接使用方法一:命令行使用gcc产生可执行文件gcc执行1-2-3命令:gcc.c文件名(可多个)-o......
  • [C++] VS Code 中导入MYSQL (包含使用gcc,g++)
    首先安装Gcc1.下载链接:https://sourceforge.net/projects/mingw-w64/files/备用网盘: https://pan.baidu.com/s/1trdQtDO6XqmfCbZHc1IDzQ?pwd=nwh5 2.添加环境变......
  • Guide to predefined macros in C++ compilers (gcc, clang, msvc etc.)
    https://blog.kowalczyk.info/article/j/guide-to-predefined-macros-in-c-compilers-gcc-clang-msvc-etc..htmlWhenwritingportableC++codeyouneedtowritecondi......
  • 搭建本地yum源+gcc
    前言虽然使用rpm包安装比较简单、快速,但是在功能上存在局限性,所以使用源码包安装。使用源码编译的方式安装软件,服务器上需安装开发环境,针对本服务器的版本,需安装gcc。而不搭......
  • angular - 另一个ID为#######的进程当前正在运行ngcc
    angular项目启动时报错首先尝试npminstall再次运行,看看它是否可以解决您的问题。尝试ngcc手动运行。删除这个文件 node_modules/@angular/compiler-cli/ngcc/__ngcc_......
  • ubuntu16.04 安装gcc8 g++8
    下载:sudoadd-apt-repositoryppa:ubuntu-toolchain-r/testsudoapt-getupdatesudoapt-getinstallgcc-8sudoapt-getinstallg++-8 配置:将gcc8,g++8作为默认选......
  • Suppressing Warnings in GCC and Clang
    #pragmaGCCdiagnosticignored"-Wunused-parameter"和#pragmaGCCdiagnosticignored"-Wdeprecated-declarations"极其有用SuppressingWarningsinGCCandClang(......
  • STM32开发之 VS Code + gcc环境编译
    写在前面:本文章旨在总结备份、方便以后查询,由于是个人总结,如有不对,欢迎指正;另外,内容大部分来自网络、书籍、和各类手册,如若侵权请告知,马上删帖致歉。在完成上一篇的ST......
  • visual studio 2015/2019下使用gcc调试linux c++开发环境搭建完整详解
    一直以来,相信绝大部分的开发都是windows/mac下做开发,尤其是非嵌入式和qt系的,而开源服务器程序绝大部分都是跑在Linux下,几乎就没有跑在windows下的。一直以来开发人员都......