https://www.ibm.com/developerworks/cn/linux/l-gcc-hacks/ GCC 和 Linux 是出色的组合.尽管它们是独立的软件,但是 Linux 完全依靠 GCC 在新的体系结构上运行.Linux 还利用 GCC 中的特性(称为扩展)实现更多功能和优化.本文讨论一些重要的扩展,讲解如何在 Linux 内核中使用它们. GCC 当前的稳定版本(版本 4.3.2)支持 C 标准的三个版本: International Organization for S
18.16.1 自写BootLoader错误 ERROR : boot.c:: warning: return type of 'main' is not `int' ANSWER : int main(void){ …… ;/*执行到这里就出错了*/ } ERROR : boot.c: In function `main':[未声明] boot.c:: warning: implicit declaration of function `uart0_init' boot.c:: warning
gcc提供了大量的警告选项,对代码中可能存在的问题提出警告,通常可以使用-Wall来开启以下警告: -Waddress -Warray-bounds (only with -O2) -Wc++0x-compat -Wchar-subscripts -Wimplicit-int -Wimplicit-function-declaration -Wcomment -Wformat -Wmain (only for C/ObjC and un