Am 26.08.25 um 21:26 schrieb Steve Schnepp:
On Tue, Aug 26, 2025 at 9:09 PM Philipp Klaus Krause <p...@spth.de> wrote:

Do SDCC users have a preference? If yes, why?

My preference is to always go the gcc/clang road, according to the
Principle of Least Astonishment.
So, what do gcc and clang do (since they are the mainstream compilers
that everyone is usually starting with) ?

Do any SDCC users currently rely on "plain int" (either directly, via
typedef or typeof) bit-fields being unsigned in SDCC? How much would it
inconvenience you if the next version of SDCC made "plain int"
bit-fields signed?

An option to choose signedness, coupled with changing the default
would be awesome in my opinion.
That said, I wasn't aware of it, so I guess the change won't affect me
as much as others.

clang always treats int as signed in bit-fields. For GCC, they are signed by default but there is -funsigned-bitfields to change that. I don't know how GCC with -funsigned-bitfields handles the typedef and typeof questions. Options like this increase the burden of maintenance and testing, so I'd prefer not to introduce it unless there is a very good reason to do so.

Philipp



_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to