如果我嘗試編譯GCC抱怨%魯%都ü
printf("here %u\n", dest->q_head);
GCC與
error: format ‘%u’ expects argument of type ‘unsigned int’, but argument 2 has type ‘ngx_uint_t {aka long unsigned int}’
不夠公平抱怨..
但是,如果我編譯
printf("here %lu\n", dest->q_head);
我得到
error: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 2 has type ‘ngx_uint_t {aka unsigned int}’
代碼中沒有其他變化。
ngx_uint_t被定義爲...
typedef unsigned int ngx_uint_t;
dest->頭被定義爲...
ngx_uint_t q_head;
如果我將它轉換爲(無符號整數)彙編並打印確定。
printf("here %u \n", (unsigned int)dest->q_head);
任何想法發生了什麼?
[無法重現](http://coliru.stacked-crooked.com/a/da1544e7ecaa4231) - [mcve]需要。 –