[Cfp-interest] format - type names issue

Jim Thomas jwthomas at cup.hp.com
Thu Feb 4 08:26:27 PST 2010


Maybe we're making an unnecessary problem for ourselves. C99 has 
specification to define complex and imaginary types in terms of real 
types without the need of additional tokens. For example, following the 
C model, if _Float256 is a real type, then _Float256 _Complex would be 
the complex types whose associated real type is _Float256. (As Fred 
notes, _Complex _Float256 would be allowed too.) I believe we got on the 
track of having a single token for complex and imaginary types because 
of a belief that C++ was unhappy with the C complex and imaginary types 
not being a single token. But if that's an issue, it's already an issue 
and implementations have dealt with it. Also, it would be better to 
follow the existing C model because the specification would fit more 
easily into the C standard and be easier to maintain.

-Jim

Jim Thomas wrote:

> Fred J. Tydeman wrote:
>
>> On Wed, 03 Feb 2010 11:30:45 -0800, Jim Thomas wrote:
>>
>>  
>>
>>> Given that the existing names for imaginary and complex types have 
>>> the associated real type first (e.g., float complex), it seems more 
>>> consistent with C style to place _Complex and _Imaginary last.
>>>   
>>
>>
>> Both
>> float complex
>> complex float
>> are valid C99.
>>
>> As per 6.7.2 Type specifiers may occur in any order.
>>  
>>
> All instances in the C standard have _Complex, _Imaginary, complex, or 
> imaginary last.
>
>> ---
>> Fred J. Tydeman        Tydeman Consulting
>> tydeman at tybor.com      Testing, numerics, programming
>> +1 (775) 358-9748      Vice-chair of PL22.11 (ANSI "C")
>> Sample C99+FPCE tests: http://www.tybor.com
>> Savers sleep well, investors eat well, spenders work forever.
>>
>> _______________________________________________
>> Cfp-interest mailing list
>> Cfp-interest at oakapple.net
>> http://mailman.oakapple.net/mailman/listinfo/cfp-interest
>>
>>
>>  
>>
>
>



More information about the Cfp-interest mailing list