#pragma Directive in C/C++
The #pragma is complier specified. for example, the code below does not work in gcc.
#pragma startup and #pragma exit:
#pragma startup func1
#pragma exit func2 void func1()
{
printf("Inside func1()\n");
} void func2()
{
printf("Inside func2()\n");
} int main()
{
printf("Inside main()\n"); return ;
}
in GCC, you can use
void __attribute__((constructor)) func1(); void __attribute__((destructor)) func2(); #pragma warn +xxx (To show the warning)
#pragma warn -xxx (To hide the warning)
#pragma warn .xxx (To toggle between hide and show)
- #pragma warn -rvl: This directive hides those warning which are raised when a function which is supposed to return a value does not return a value.
- #pragma warn -par: This directive hides those warning which are raised when a function does not uses the parameters passed to it.
- #pragma warn -rch: This directive hides those warning which are raised when a code is unreachable. For example: any code written after the return statement in a function is unreachable.
#pragma Directive in C/C++的更多相关文章
- 重新梳理HTML基础知识
缘起 HTML(HyperText Markup Language超文本标记语言)是用于构建web页面的标记语言和通用标准.它并不是一项新的发明,因为超文本(具有超链接的文本)和标记语言(用于电子文档 ...
- C中的预编译宏定义
可以用宏判断是否为ARC环境 #if _has_feature(objc_arc) #else //MRC #endif C中的预编译宏定义 -- 作者: infobillows 来源:网络 在将一 ...
- How do I place a group of functions or variables in a specific section?
http://supp.iar.com/Support/?Note=27498 EWARM v5.xx (and newer) The placement of a few functions in ...
- RFC 2616
Network Working Group R. Fielding Request for Comments: 2616 UC Irvine Obsoletes: 2068 J. Gettys Cat ...
- 基于NodeJs的网页爬虫的构建(一)
好久没写博客了,这段时间已经忙成狗,半年时间就这么没了,必须得做一下总结否则白忙.接下去可能会有一系列的总结,都是关于定向爬虫(干了好几个月后才知道这个名词)的构建方法,实现平台是Node.JS. 背 ...
- scanf()常犯错误
------------------------------------------------------------------------ <> 本意:接收字符串. 写成代码:voi ...
- RFC2616-HTTP1.1-Header Field Definitions(头字段规定部分—单词注释版)
part of Hypertext Transfer Protocol -- HTTP/1.1RFC 2616 Fielding, et al. 14 Header Field Definitions ...
- HTML5 Differences from HTML4
Abstract "HTML5 Differences from HTML4" describes the differences of the HTML5 specificati ...
- C预编译, 预处理, C/C++头文件, 编译控制,
在所有的预处理指令中,#Pragma 指令可能是最复杂的了,它的作用是设定编译器的状态或者是指示编译器完成一些特定的动作.#pragma指令对每个编译器给出了一个方法,在保持与C和C++语言完全兼容的 ...
随机推荐
- Cracking The Coding Interview 1.3
//原文: // // Design an algorithm and write code to remove the duplicate characters in a string withou ...
- html页面技巧
Query获取Select选择的Text和Value: 语法解释: 1. $("#select_id").change(function(){//code...}); //为S ...
- Centos7搭建软路由
Xenserver环境: 一:环境准备 内网:192.168.2.100 外网:x.x.x.x 1.1:登陆XenCenter 1.2:进入Xenserver中的Networking选项 1.3:点选 ...
- Oracle 用户 表 表空间之间的关系和管理
文献地址: https://blog.csdn.net/jmilk/article/details/51599260 https://www.cnblogs.com/roger112/p/768530 ...
- 编程实现Linux系统的od功能
选做题目以及分析 题目:编写MyOD.java 用java MyOD XXX实现Linux下od -tx -tc XXX的功能 分析:我觉得这道题目中的参数应当是-tx1而不是-tx,使用了-tx后结 ...
- L267 How to save money
When it comes to saving money, the struggle is all too real. It's like your bank account and your 20 ...
- MySq:权限表
权限表 一.介绍 ①MySQL服务器通过权限表来控制用户对数据库的访问,权限表存放在MySQL数据库中,由mysql_install_db脚本初始化.②存储账户权限信息表主要有:user.db.hos ...
- 1.横向滚动条,要设置两个div包裹. 2. 点击切换视频或者图片. overflow . overflow-x
1.横向滚动条. div.1 > div.2 > img img img 第一: 设置 div.1 一个固定的宽度 和高度 . 例如宽度 700px; 高度是 120px; 设置 o ...
- embedding与word2vec
embedding是指将目标向量化,常用于自然语言处理(如:Word2Vec).这种思想的意义在于,可以将语义问题转换为数值计算问题,从而使计算机能够便捷处理自然语言问题.如果采用传统的One-hot ...
- mssql,mysql,Oracle 数据库中获得UUID字符串
sql server : select replace(newId(),'-','') oracle :select sys_guid() from dual SQL> select sys_g ...