➜

This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

作者 loewis
收信人 alexandre.vassalotti, christian.heimes, donmez, gregory.p.smith, gvanrossum, loewis
日期 2008-01-20.17:47:00
SpamBayes Score 0.18949549
Marked as misclassified 否
Message-id <47938912.4010004@v.loewis.de>
In-reply-to <47935293.7010306@cheimes.de>
内容
> Does the C89 standard allow this code?
> 
> int q = 1;
> int p = (unsigned)q;
> I've never seen an unsigned cast without a type.

Yes, that's fine; it's a different spelling of "unsigned int".
In C99, 6.7.2p1 defines the following groups as equivalent:
- short, signed short, short int, or signed short int
- unsigned short, or unsigned short int
- int, signed, or signed int
- unsigned, or unsigned int
- long, signed long, long int, or signed long int
- unsigned long, or unsigned long int
- long long, signed long long, long long int, or
            signed long long int
- unsigned long long, or unsigned long long int

Specifiers may occur in any order, so you may also write
"int short unsigned".
历史
日期 用户 动作 参数
2008-01-20 17:47:02loewis修改spambayes_score: 0.189495 -> 0.18949549
recipients: + loewis, gvanrossum, gregory.p.smith, christian.heimes, alexandre.vassalotti, donmez
2008-01-20 17:47:01loewis链接issue1621 messages
2008-01-20 17:47:00loewis创建