Re: [9fans] Conversion of constants in C compiler

2022-04-20 Thread ori
Quoth adr : > Some thoughts to help me decide what to do in my dist? The c99 rule is probably the one to follow, along side the plan9 unsigned preserving rule. When you have a patch, let me know -- I'll happily test and apply to 9front. -- 9fans: 9fans

Re: [9fans] Conversion of constants in C compiler

2022-04-20 Thread adr
On Wed, 20 Apr 2022, Charles Forsyth wrote: The short answer is whatever the historical reasons for the current interpretation(s), it should follow C99 rules to avoid confusion. This should do the trick. I hope to not have to send another patch in half an hour... Charles, you are part of

Re: [9fans] Conversion of constants in C compiler

2022-04-20 Thread Charles Forsyth
The short answer is whatever the historical reasons for the current interpretation(s), it should follow C99 rules to avoid confusion. One potential catch is that the compilers don't implement C99 rules when signed and unsigned values meet, but something closer to the original convention (which

[9fans] Conversion of constants in C compiler

2022-04-20 Thread adr
Hi. I've been tinkering again with the dist I shared before in http://adr.freeshell.org/plan9, basically 9legacy + Miller's 9pi + 9front's libseq. Importing ori's git9 I noticed that the compiler was truncating a constant without the correspondent suffix. According to C99, the type of a