tech-toolchain archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Conflict between system and compiler types



On 04.02.2019 14:38, Christos Zoulas wrote:
> In article <f87d8d38-ca50-7cb5-0716-4f894070fa0d%gmx.com@localhost>,
> Kamil Rytarowski  <n54%gmx.com@localhost> wrote:
>>
>> The bar for a compiler using our native headers is already higher than
>> that so this doesn't change anything.
>>
>> It's a stronger proposal but we could require these types and remove
>> entirely homegrown redefinitions and maintain the types directly in
>> compilers.
>>
>> There is already a header using the compiler builtins.
>>
>> https://nxr.netbsd.org/xref/src/sys/sys/common_ansi.h#65
>>
>> OR1K and RISCV use them from the start.
>>
>> So the current proposal is to replace all src/sys/arch/*/include/ansi.h
>> with a single include of sys/common_ansi.h, analogously to RICCV and OR1K.
>>
>> What do you think?
> 
> It is not as simple as that. We have c++ to thank for that and the
> encoding of types in function name mangling. For example there are
> 32 bit architectures where size_t is unsigned int and not unsigned
> long and they need to be handled specially. I think that the best
> way is to do it gradually and handle the easy ones first...
> 

Right, we shall double check that types in compilers are matching
headers, probably switching one after another.

> christos
> 


Attachment: signature.asc
Description: OpenPGP digital signature



Home | Main Index | Thread Index | Old Index