常见gcc 编译错误整理
更新时间:2024-06-29 06:56:01 阅读量: 综合文库 文档下载
- 常见GC检测器推荐度:
- 相关推荐
常见gcc 编译错误整理(开始) 1
1 error: expected expression before 'else' else之前无表达式。
2 error: lvalue required as left operand of assignment 左值问题。
3 error: invalid storage class for function 'XXXXXX' 在文件的某个地方,丢失了一个大括号‘}’。
常见gcc编译警告整理(开始)
1、warning: no newline at end of file 在文件最后一行加上回车键
解释:在《Rationale for the C99 standard》一文中,有C99的相关信息:
A backslash immediately before a newline has long been used to continue string literals, as well as preprocessing command lines. In the interest of easing machine generation of C, and of transporting code to machines with restrictive physical line lengths, the C89 Committee generalized this mechanism to permit any token to be continued by interposing a backslash/newline sequence.
c/c++代码的每一行后面有一个“结束符”,也就是newline。避免当被include的文件展开后,前一个文件的最后一行与后一个文件的第一行直接被连接成一行从而造成错误。 2、warning: comparison between pointer and integer 解释:integer与pointer比较
3、 warning: assignment discards qualifiers from pointer target type 解释:赋值时,取消了右值的限定。
4、 warning: passing argument 1 of 'send' makes pointer from integer without a cast 解释:函数send的第一个integer型参数没有强制转换为pointer型 5、warning: comparison is always true due to limited range of data type 解释:由于数据类型范围的限制,比较结果一直为真。 6、warning: initialization from incompatible pointer type 解释:不兼容指针类型的初始化
7、 warning: return makes pointer from integer without a cast 解释:return使integer转换为pointer,没有加强制类型转换。 8、warning: incompatible implicit declaration of built-in function 'printf' 解释:与内置的printf函数隐士声明不兼容。
9、warning: initialization discards qualifiers from pointer target type 解释:initialization取消了指针目标类型的限定。
10、warning: comparison is always false due to limited range of data type
由于类型限制,比较一直是假
11、warning: assignment from incompatible pointer type
不兼容的指针间赋值
12、warning: passing argument 1 of 'mes_read_time' discards qualifiers from pointer target type12、
mes_函数第一个参数的传递,丢弃了指针目标类型限定。
13、warning: \
——type重定义
14、warning: 'return' with a value, in function returning void
在void返回类型的函数中,return返回值。
正在阅读:
常见gcc 编译错误整理06-29
数学:第二十三章《旋转》复习教案1(人教新课标九年级上)05-23
人民检察院刑事诉讼法律文书格式样本12-26
冷风射流机 说明书03-29
作业一解答01-09
创业模拟培训理论考试参考答案01-23
浙江省绍兴市绍兴县杨汛桥镇八年级英语上册Unit10Ifyougototheparty,youll11-02
食品安全管理体系认证实施细则04-07
(北京专用)2016高考地理一轮复习 13.2森林的开发和保护-以亚马孙热带雨林为例课后作业05-10
小车技能竞赛秩序册(定稿)06-04
- 多层物业服务方案
- (审判实务)习惯法与少数民族地区民间纠纷解决问题(孙 潋)
- 人教版新课标六年级下册语文全册教案
- 词语打卡
- photoshop实习报告
- 钢结构设计原理综合测试2
- 2014年期末练习题
- 高中数学中的逆向思维解题方法探讨
- 名师原创 全国通用2014-2015学年高二寒假作业 政治(一)Word版
- 北航《建筑结构检测鉴定与加固》在线作业三
- XX县卫生监督所工程建设项目可行性研究报告
- 小学四年级观察作文经典评语
- 浅谈110KV变电站电气一次设计-程泉焱(1)
- 安全员考试题库
- 国家电网公司变电运维管理规定(试行)
- 义务教育课程标准稿征求意见提纲
- 教学秘书面试技巧
- 钢结构工程施工组织设计
- 水利工程概论论文
- 09届九年级数学第四次模拟试卷
- 编译
- 整理
- 常见
- 错误
- gcc
- LINGO 软件的基本使用方法
- 让学生与数学交朋友论文
- 网络环境下高中英语作文训练探索 - 图文
- 人教部编二年级语文上册《雾在哪里》教学设计举例第二 课时
- 苏州工业园区福利
- 5工作总结:关于加强乡镇纪委监督执纪问责工作的思考
- 浅谈如何发展群众文化活动
- 绳彩飞扬课程纲要
- 机电与维修电工安装与调试技能竞赛试题A
- 北师大五年级数学上册教学计划及进度表
- 建材行业增值税管理的实践与思考
- 见证取样监理细则
- 中国桥梁发展史 - 图文
- 公路工程管理与实务 讲义资料
- 2012贵州高招三本院校网上补报志愿说明
- 2016-2017学年高一化学必修2期末试卷(含答案)
- 第二章复习提纲
- 南京atsl改氙气大灯led日行灯大灯总成改装 - 图文
- 自制 电子智能抢答器(单片机)毕业设计论文 - 图文
- 兰州理工大学西校区图书馆项目部质量策划