开发者

How to use __extension__ and __typeof__ in a minified example in C?

开发者 https://www.devze.com 2023-02-17 07:16 出处:网络
I开发者_开发百科 saw there are such tokens in gcc\'s source code, but how to use these 2 tokens?__extension__:

I开发者_开发百科 saw there are such tokens in gcc's source code,

but how to use these 2 tokens?


__extension__:

GCC uses the __extension__ attribute when using the -ansi flag to avoid warnings in headers with GCC extensions. This is mostly used in glibc with function declartions using long long

__typeof__:

MIN and MAX in C is a good example how it's used. Basically it allows you to declare a variable which has the same type as another variable.

0

精彩评论

暂无评论...
验证码 换一张
取 消