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.

Author loewis
Recipients alexandre.vassalotti, christian.heimes, donmez, gregory.p.smith, gvanrossum, loewis
Date 2008-01-20.17:47:00
SpamBayes Score 0.18949549
Marked as misclassified No
Message-id <47938912.4010004@v.loewis.de>
In-reply-to <47935293.7010306@cheimes.de>
Content
> 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".
History
Date User Action Args
2008-01-20 17:47:02loewissetspambayes_score: 0.189495 -> 0.18949549
recipients: + loewis, gvanrossum, gregory.p.smith, christian.heimes, alexandre.vassalotti, donmez
2008-01-20 17:47:01loewislinkissue1621 messages
2008-01-20 17:47:00loewiscreate