Pat*_*ick 32 c c++ gcc types gcc-warning
-Wlong-longgcc警告的原因是什么?
从gcc手册页:
-Wlong-long
Warn if long long type is used. This is enabled by either -Wpedantic or -Wtraditional in ISO C90 and C++98 modes. To inhibit the warning messages, use -Wno-long-long.
Run Code Online (Sandbox Code Playgroud)
据我了解,long long要求至少为64位(实际上它总是64位,至少与今天的编译器一样).这不是ISO C90或C++ 98的情况,还是有其他原因不使用long long?
我知道<stdint.h>类型int64_t和朋友的类型,但一些不太老的编译器(例如VS2005和Green Hills ARM 3.5)不提供<stdint.h>,我认为long long(至少)64位用于那些和更新的工具链.
a3f*_*a3f 37
long longISO C90和C++ 98中还没有类型.它仅在ISO C99和C++ 11中添加.
然而,GCC在标准化之前将其作为扩展.